what does it mean by
"error: expected unqualified-id before '=' token|"
"|error: `i' was not declared in this scope|"
"error: `cout' was not declared in this scope|"
"error: `endl' was not declared in this scope|"
for this code.

int main()
{
for(int = 1; i < 100; i += 2)
{
cout << i << endl;
}
return 0; //End Statement.
}

Please study about C++ standard libraries and namespaces.

Your code should be changed to:

#include <iostream>
using namespace std;

int main()
{
for(int i = 1; i < 100; i += 2) //You were missing i here
{
cout << i << endl;
}
return 0; //End Statement.
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.