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...
Type: Posts; User: CSaw
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...
Search on Google, for any APIs that provides this sort of information in the way of function calls, etc.
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...
I do not understand this sentence. May you reiterate it?
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...
Not sure I understand..doesn't the inline specifier ask the compiler to replace the function call with the body of the function instead?
Nothing. But I can imagine a function will occupy more than one location in memory. Am I wrong?
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...
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...
You can implement OOP in C using structs, function pointers, etc. Have you read Object Oriented Programming With ANSI C?
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...
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...
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...
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...
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...
Thanks for clearing that up laserlight. I've never read the standard before, I've been told it isn't a fun experience...
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;
}
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...
In a way, yes but obviously you wouldn't be performing these operations with void pointers ;)
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 )....
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...
Exactly my point Bayint! Let's look at it this way:
numPtr = &numPtr;
numPtr == *numPtr
but numPtr = &numPtr:
(&numPtr) == *(&numPtr) => &numPtr == numPtr
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");
//....
printf("hello!!! mr. %d %d %d",++*numPtr,numPtr,numPtr+1);
//....
From original post.
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...