New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Problem with cout, complex type on Xcode


Post Reply New Thread Subscribe

 
Thread Tools
mk ii

 
Member Since: Jan 24, 2013
Posts: 1
mk ii is on a distinguished road

mk ii is offline
Hi,
The following segment:

Code:
#include <iostream>
#include <complex>

int main (int argc, char * const argv[]) 
{
    std::complex<double> a(1.,1.);
    std::cout << "a = "<< a << "\n";
    return 0;
}
using Xcode 3.2 (the project setting is 'Command Line tool') on OSX 10.6.8 compiles fine and produces the following output:

a = (

when of course it should produce:

a = (1.,1.)

Yes, I can display the real and imaginary parts using a.real(), a.imag() but the above should work.

Any ideas why Xcode / OSX has this weird behaviour? Has anyone else seen this, any suggestions?
Cheers,
m
QUOTE Thanks

Post Reply New Thread Subscribe


« RABCDAsm and Yogda Alternatives | Reference getting lost for a view / Retain count becoming 0 abruptly - xcode »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Problem with launching x11 applications kousik OS X - Development and Darwin 8 11-19-2009 12:42 AM
Basic Problem reading input from NSTextCell in Xcode Alex_Rutherford OS X - Development and Darwin 1 10-22-2009 09:22 PM
Xcode problem mathman OS X - Apps and Games 4 06-08-2009 11:09 AM
Problem Working with Xcode 3.1.2 cancell Running Windows (or anything else) on your Mac 0 04-01-2009 02:51 AM
osx install blue screen hell David123 OS X - Operating System 10 08-22-2004 04:40 PM

All times are GMT -4. The time now is 10:28 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?