Salem_c's Profile User Rating: ****-

Reputation: 1889 Grandmaster
Group:
Mentors
Active Posts:
3,696 (2.07 per day)
Joined:
30-May 10
Profile Views:
40,324
Last Active:
User is offline Yesterday, 11:04 PM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0
Icon   Salem_c has not set their status

Posts I've Made

  1. In Topic: Calculation in C

    Posted 20 Apr 2015

    > 10 scanf("%d",OpeningBalance);
    I'm surprised you got any answer at all, since you forgot the & on all your scanf calls.

    Eg.
    scanf("%d",&OpeningBalance);


    > But when I put 5 digit value like 70000+10000-5000,
    > Then I am getting the wrong answer something like 5002 from it instead of 75000.
    > Where I am mistaking?
    Well since you include conio.h and void main (both horrible by the way), my guess is you're some poor student being lumbered with TurboC.
    This 25 year old FOSSIL has only 16 bit integers, so anything outside the range +/-32767 is going to give you strange answers.

    You might want to ask your tutor how knowing about a 16 bit obsolete compiler will prepare you for the 64-bit world everyone is moving towards at break-neck speed.

    Read my sig-links.
  2. In Topic: Volatile uint8_t variable in interrupts

    Posted 19 Apr 2015

    > I want to use this function in two different interrupt handlers.
    And is rx guarded by a mutex so that you can be sure that when fifo_read() returns in both handlers, that you actually have in rx the value you expect, and NOT the value from the pre-empting interrupt handler.

    A problem which would so easily go away if you didn't have a shared variable.
  3. In Topic: Implementing basic IPsec AH transport mode via divert socket

    Posted 19 Apr 2015

    Email yourself 5 years ago, not to just dump pith on the end of long dead threads.
  4. In Topic: Initialization List

    Posted 19 Apr 2015

    Strings support assignment

    so name(h.name) should be all you need.
  5. In Topic: Initialization List

    Posted 19 Apr 2015

    I would suggest you make the member
    std::string name;

    and stop worrying about things 'sharing' memory.

My Information

Member Title:
void main'ers are DOOMED
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Programming Languages:
C, C++, Perl, awk, various assemblers

Contact Information

E-mail:
Private

Comments

Page 1 of 1
  1. Photo

    fromTheSprawl Icon

    07 Sep 2012 - 02:38
    Please read my thread. I kid! Just want to say your forum avatar is awesome. ^^
  2. Photo

    Salem_c Icon

    26 Dec 2010 - 01:36
    Do not PM me for 1:1 support, or to try to get me to read your threads.
Page 1 of 1