• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
C++ compile problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C++ compile problems


  • Subject: C++ compile problems
  • From: "email@hidden" <email@hidden>
  • Date: Fri, 25 Jun 2004 00:49:53 -0400 (EDT)

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.


  • Follow-Ups:
    • Re: C++ compile problems
      • From: Chris Ridd <email@hidden>
    • Re: C++ compile problems
      • From: Justin Walker <email@hidden>
  • Prev by Date: Re: Why Xcode?
  • Next by Date: C++ compile problems
  • Previous by thread: Re: application halts at __dyld_gdb_dyld_state_changed?
  • Next by thread: Re: C++ compile problems
  • Index(es):
    • Date
    • Thread