Thanks Elysia. I do not quite understand why I find it confusing. My teacher only showed us one example during class and it did not have to do with string. And i havent been looking for examples of what i was assigned, I was looking for tutorials to learn how to do loops. And all of them were int.
This is the one he showed us:
Code:
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
//x++, x+=, x-=
int x=0, grade=0, total=0;
while (x <= 30)
{
cout<<x<<endl;
x+=3;
}
/*while (true)
{
if(x % 3 ==0)
cout<<x<<endl;
x++;
}*/
system("PAUSE");
return EXIT_SUCCESS;
}