• 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
Odd gcc error passing reference parameter to function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Odd gcc error passing reference parameter to function


  • Subject: Odd gcc error passing reference parameter to function
  • From: John Weeks <email@hidden>
  • Date: Thu, 10 Mar 2005 13:23:43 -0800

I have just started using Xcode. My first project is developing a plug-in
for my company's main product. I thought that would be a good way to
introduce myself to Xcode.

I have encountered a compile error that seems to me to be bogus and I was
wondering if anyone can shed light on it. I define a function with this
prototype:

int ExtractAnalogChannelInfo(string::iterator &currentC, string::iterator
&theEnd, const string &termchars, long &channelNum, long &ctype, double
&Vmin, double &Vmax, int &termchar);

This results in the error:

error: in passing argument 2 of `int
ScanParse::ExtractAnalogChannelInfo(__gnu_cxx::__normal_iterator<char*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&,
__gnu_cxx::__normal_iterator<char*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >&, const std::string&, long
int&, long int&, double&, double&, int&)'

If I change the second parameter to pass-by-value instead of a reference,
it compiles.

VC++.net compiles the unchanged statement OK, and the first reference
compilesin Xcode, so it's not some obscure characteristic of
string::iterator (or is it?).

Xcode: 1.5 IDE: 389.0 Core: 387.0 ToolSupport: 372.0
Running on OS X 10.3.7

How do I found out the version of gcc on my machine?

Thanks for any help with this.

Regards,
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax   (503) 620-6754
email   email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Odd gcc error passing reference parameter to function
      • From: Jerry <email@hidden>
  • Prev by Date: Re: .mode1 files?
  • Next by Date: Re: XCode documentation index; executable runtime paths
  • Previous by thread: Re: .mode1 files?
  • Next by thread: Re: Odd gcc error passing reference parameter to function
  • Index(es):
    • Date
    • Thread