C++ compile problems
C++ compile problems
even when I do a g++ compile in terminal, i get the same errors as in Xcode. But the errors seem to be incongruent with C++ programming style. Look at my code followed by the errors. Any suggestions would be monumental!!! I have a C++ programming class and if I can get the C++ compiler to work I would be in heaven.
int main () {
string word[]={"Arizona","walk","government","C++","beach");
int wordsize = sizeof(word)/sizeof(string), i;
for (int j=0;j<wordsize;j++)
cout<<word[j]<<" ";
cout << endln;
//now pass each word to numberVowels
for (i=0;i<wordsize;i++)
{
cout<<word[i]<<": ",,numberVowels(word[i])<<" vowels"<<endl;
firstLast(word[i]);
}
return 0;
}
-----
main.cpp: In function `int main()':
main.cpp:12: error: parse error before `)' token
main.cpp:13: error: `i' undeclared (first use this function)
The most personalized portal on the Web!
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.