-
Weird printf() problem
I have the following code below that I think is causing problems:
Code:
#include <stdio.h>
#include "rt.h"
int main()
{
// Some code irrelevant to the problem
int send_c = 3;
// More code irrelevant to the problem
printf("Hit RETURN to Write the integer %d to the pipeline.....\n", &send_c) ;
// More code irrelevant to the problem
return 0;
}
However, the MS-DOS command prompt outputs "1244988" rather than 3. Does anyone have a suggestion of possibly why it's doing so?
-
How about you print the value of the integer instead of its address?
BTW, this is C code, not truly C++.
-
Thanks for the help. Solved my problem.