Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Question about exceptions in C++ via Xcode
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="redhotdaddy" data-source="post: 37304"><p><strong>Bad C++ compiling in Xcode</strong></p><p></p><p>Im also getting bad compiling errors when trying to compile C++ written code in XCode.</p><p></p><p>for example 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.</p><p></p><p></p><p>int main () {</p><p> string word[]={"Arizona","walk","government","C++","beach");</p><p> int wordsize = sizeof(word)/sizeof(string), i;</p><p> for (int j=0;j<wordsize;j++)</p><p> cout<<word[j]<<" ";</p><p> cout << endln;</p><p>//now pass each word to numberVowels</p><p> for (i=0;i<wordsize;i++)</p><p> {</p><p> cout<<word<em><<": ",,numberVowels(word<em>)<<" vowels"<<endl;</em></em></p><p><em><em> firstLast(word<em>);</em></em></em></p><p><em><em><em> }</em></em></em></p><p><em><em><em> return 0;</em></em></em></p><p><em><em><em>}</em></em></em></p><p><em><em><em></em></em></em></p><p><em><em><em></em></em></em></p><p><em><em><em>-----</em></em></em></p><p><em><em><em></em></em></em></p><p><em><em><em>main.cpp: In function `int main()':</em></em></em></p><p><em><em><em>main.cpp:12: error: parse error before `)' token</em></em></em></p><p><em><em><em>main.cpp:13: error: `i' undeclared (first use this function)</em></em></em></p><p><em><em><em></em></em></em></p><p><em><em><em></em></em></em></p><p><em><em><em>the latter errors seem to be errors that wouldnt be flagged in a C++ compiler. Am I wrong?</em></em></em></p></blockquote><p></p>
[QUOTE="redhotdaddy, post: 37304"] [b]Bad C++ compiling in Xcode[/b] Im also getting bad compiling errors when trying to compile C++ written code in XCode. for example 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 latter errors seem to be errors that wouldnt be flagged in a C++ compiler. Am I wrong?[/i][/i][/i] [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Question about exceptions in C++ via Xcode
Top