-
noob
Code:
#include <cstdlib>
#include <iostream>
#include <time.h>
using namespace std;
int main(int argc, char *argv[])
{
char *count="HOw Are you";
for (count<100);
cout<< count<<endl;
cin.get();
return EXIT_SUCCESS;
}
i got an error during compilation, please help. What i ma trying to do is let the program prints out 100 "how are you"
-
Read up on using the correct format for creating a loop.
-
Also this is C++, not C. Make up your mind what language you're writing in.
-
you can't use your char* variable as a counter too. you must declare another integer variable for that job.
and check the for loop syntax, it's completely messed. check it out here: http://www.cprogramming.com/reference/for.html
And like MacGyver said, your code is C++ code. Which language are you using? C, or C++?