Search:

Type: Posts; User: CSaw

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Loop code problem

    by CSaw
    Replies
    12
    Views
    1,722

    Why do you need it to go back to the start of the...

    Why do you need it to go back to the start of the program? Can't you just add another scanf function call at the bottom of the while loop? (I'm assuming you reason for needing to return to the...
  2. Thread: Code help

    by CSaw
    Replies
    2
    Views
    849

    Search on Google, for any APIs that provides this...

    Search on Google, for any APIs that provides this sort of information in the way of function calls, etc.
  3. Thread: What next?

    by CSaw
    Replies
    5
    Views
    954

    I would advice not going down the Win API road,...

    I would advice not going down the Win API road, and that you do spend more time learning about algorithms and data structures, and try and implement them in C.

    I doubt very much if learning to...
  4. Replies
    11
    Views
    1,210

    I do not understand this sentence. May you...

    I do not understand this sentence. May you reiterate it?
  5. What I meant was that, like an array exists as a...

    What I meant was that, like an array exists as a block of contiguous memory, so must a function? In other words a function takes up more than one address in memory does it not? ( as a function has to...
  6. Not sure I understand..doesn't the inline...

    Not sure I understand..doesn't the inline specifier ask the compiler to replace the function call with the body of the function instead?
  7. Nothing. But I can imagine a function will occupy...

    Nothing. But I can imagine a function will occupy more than one location in memory. Am I wrong?
  8. Replies
    4
    Views
    3,513

    I disapprove of using this approach, perhaps...

    I disapprove of using this approach, perhaps using the debugger ( hopefully you have one ) would be a better idea. If you do not have one, I'd seriously consider getting one, that way you won't have...
  9. I believe that both ways of assigning a function...

    I believe that both ways of assigning a function have some semantic evidence for their use, but like almost anything in programming that has more than one way to do it, it becomes a matter of...
  10. You can implement OOP in C using structs,...

    You can implement OOP in C using structs, function pointers, etc. Have you read Object Oriented Programming With ANSI C?
  11. I don't think C++ would of been as popular as it...

    I don't think C++ would of been as popular as it is, if it had not been backwards compatible with C. But that can never be proved. So...

    Also with the function name being equal to the address of...
  12. Thread: Is C out of date?

    by CSaw
    Replies
    68
    Views
    9,874

    I'm still here, just in case anyone was...

    I'm still here, just in case anyone was wondering. I haven't bothered to post again because I was just content with following the discussion and seeing what you all thought. Although my knowledge of...
  13. Thread: Object Oriented C

    by CSaw
    Replies
    6
    Views
    6,978

    Thanks! Yeah I watched some Stanford University...

    Thanks! Yeah I watched some Stanford University Youtube videos on creating a generic stack type, the method used was the same one you are describing here. In my opinion, I think it is some much...
  14. p holds the address of the first character in the...

    p holds the address of the first character in the string literal, in this case "H".

    p [Address of string literal] -> ["H....]

    retptr is a pointer that pointer to a character pointer so when it...
  15. Thread: Is C out of date?

    by CSaw
    Replies
    68
    Views
    9,874

    Is C out of date?

    Hi, just wanted to get everyone's thoughts on this. What I mean by my title is, I'm going to University to do a degree and hopefully if I get it, it will be four years down the road and I'll be...
  16. Replies
    20
    Views
    4,635

    Thanks for clearing that up laserlight. I've...

    Thanks for clearing that up laserlight. I've never read the standard before, I've been told it isn't a fun experience...
  17. Replies
    6
    Views
    5,990

    You could add the following to the end of your...

    You could add the following to the end of your program's main function ( but before the return satement:



    int main()
    {
    //...other code...
    getchar();
    return 0;
    }
  18. Thread: Object Oriented C

    by CSaw
    Replies
    6
    Views
    6,978

    Object Oriented C

    Hi, I was just looking for some thoughts from all of you about object oriented programming in C. I have been reading the book Object Oriented Programming with ANSI by Axel-Tobias Schreiner which I'm...
  19. Replies
    20
    Views
    4,635

    In a way, yes but obviously you wouldn't be...

    In a way, yes but obviously you wouldn't be performing these operations with void pointers ;)
  20. Replies
    20
    Views
    4,635

    Is this particular case undefined behaviour...

    Is this particular case undefined behaviour though? I don't see that it is, the way the compiler deals with it seems logical, to me at least ( but I don't think that will count for anything )....
  21. Replies
    20
    Views
    4,635

    Oh no, I got a warning as well, but it will still...

    Oh no, I got a warning as well, but it will still compile and run. Yes, it is probably not a good idea assigning to a variable using different levels of indirection, but that wasn't what I was...
  22. Replies
    20
    Views
    4,635

    Exactly my point Bayint! Let's look at it this...

    Exactly my point Bayint! Let's look at it this way:

    numPtr = &numPtr;

    numPtr == *numPtr

    but numPtr = &numPtr:

    (&numPtr) == *(&numPtr) => &numPtr == numPtr
  23. Replies
    20
    Views
    4,635

    Actually I tried it out on my compiler and wow...

    Actually I tried it out on my compiler and wow was printed...here is my code:



    int main()
    {
    int *numPtr = &numPtr;
    if(numPtr == *numPtr)
    {
    puts("woow");
  24. Replies
    20
    Views
    4,635

    //.... printf("hello!!! mr. %d %d...

    //....
    printf("hello!!! mr. %d %d %d",++*numPtr,numPtr,numPtr+1);
    //....


    From original post.
  25. Replies
    20
    Views
    4,635

    int number = 100; int *numPtr =(&numPtr);...

    int number = 100;
    int *numPtr =(&numPtr);
    if(numPtr == *numPtr)
    {
    printf("wow!!!");
    }
    clrscr();


    Does clrscr(); have anything to do with not seeing "wow!!!", I don't that function available...
Results 1 to 25 of 33
Page 1 of 2 1 2