Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arguments are not being passed correctly -- Please help




Am 05.10.2005 um 20:18 schrieb Markian Hlynka:

not 100% sure here, but I think...

std::cout << sum3(100.0, 100.0, 100.0) << std::endl; // breakpoint

sum3 returns a double. but where does that double go? [...]

I'm neither a C++ expert, so I can join the group :-)

How about using a good ol' printf()? Here's clearly defined what's going on:

    #include <stdio.h>
    ...
    printf("%lf\n", sum3(100., 100., 100.));
    ...

Additionally, the compiler warns you about mismatches between the format string and the number/type of parameters.


Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/




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

This email sent to email@hidden
References: 
 >Arguments are not being passed correctly -- Please help (From: Berndt Jung <email@hidden>)
 >Re: Arguments are not being passed correctly -- Please help (From: Markian Hlynka <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.