There is two question in you program, I think.
First, the array nums[50] should be initialized.
Second, I think there will be a dead loop in lines 15-19.
and if you don't want to initialize the array, you can define it as global variables, and the compilier will defautly initialized it with 0;
User Profile
Collapse
-
Sorry, I think you are not quite catch me.
if you want to print Goodbye, Then you should use the following code:Code:if(!printf("Goodbye")) { printf("Goodbye"); } else { printf(" World"); }
Is that right?
Thank you!Leave a comment:
-
I think !printf("hello ") will be worked.
Code:if(!printf("hello")) { printf("Hello"); } else { printf(" World"); }
Leave a comment:
-
Hi,
It's really very strange.But I still believed that if you wanted to create an ifstream, the file must be created first.Its' not the trunc flag that create the file.
The effect of in|out|truc has the same functions as "w+" in C, it's effect is described as folowing: Truncate to 0 length, if existent, or create text file for update
For more information please refer to the following link http://stdcxx.apache.o rg/doc/...Leave a comment:
-
I think you should create this two file: itest.txt and ftest.txt first.
Is that right? Thank you!Leave a comment:
No activity results to display
Show More
Leave a comment: