x code question

Discussion in 'Mac Programming' started by benlangdon, Mar 6, 2008.

  1. macrumors 65832

    benlangdon

    Joined:
    Jan 13, 2008
    #1
    so installed x code but now im trying to use it and its um... where do i write?
    i am doing very basic c++
    so... where do i start this thing? i have no idea what im doing ive used code warrior once and eclipse on a pc very very briefly

    any help thanks
     
  2. macrumors 6502a

    Joined:
    Jan 9, 2002
    Location:
    Kellogg IA
    #2
  3. thread starter macrumors 65832

    benlangdon

    Joined:
    Jan 13, 2008
    #3
    is this only c because i need c++
    man i wrote this program up and it doesn't work i need to know how to just change it to compile c++
     
  4. macrumors regular

    Joined:
    Mar 5, 2006
    #4
    The Dave Mark book does not cover C++.

    You need to create a C++ Tool project. Start Xcode, and choose File > New Project. A dialog box with a list of project types will open. Select C++ Tool, which is in the Command Line Utility section.

    If you click the link in my signature, you can find an article that walks the reader through the creation of a simple C++ program in Xcode.
     
  5. thread starter macrumors 65832

    benlangdon

    Joined:
    Jan 13, 2008
    #5
    thanks i already figured it out though.:D
    if you could help me with one last thing :)
    when you enter in a variable when running the program how do you write the code so that it can be a decimal. don't you put a % somewhere:confused:
     
  6. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
  7. macrumors 6502

    Joined:
    Jun 16, 2004
    #7
    Or, using C++ (like specified), just use cin.
     
  8. thread starter macrumors 65832

    benlangdon

    Joined:
    Jan 13, 2008
    #8
    :confused:

    where do i put cin:confused:
     
  9. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #9
    I think you should probably spend some time learning C++. Read http://www.cplusplus.com/ and buy yourself a good book. It will come in handy.
     
  10. thread starter macrumors 65832

    benlangdon

    Joined:
    Jan 13, 2008
    #10
    ya i know im taking computer science right now so... ya my teacher can barrely speak english and says ok and right at least 200+ times during class so its ...
     
  11. macrumors 6502

    Joined:
    Jun 16, 2004
    #11
    Try not to judge your professors just for that. I had a professor in uni that was like that, but was also one of the few professors who actually knew what he was saying (probably the best in the major at my uni)... not to mention it doesn't look like you can write English very well either
     
  12. thread starter macrumors 65832

    benlangdon

    Joined:
    Jan 13, 2008
    #12
    ya, i know i get it.
    she used to work for ibm.
    but still i cannot understand what she says.
    also, determining my english skills based on how I type on a forum is ;)
     
  13. macrumors member

    Joined:
    Feb 12, 2008
    #13
    lolol:D:D
     
  14. macrumors 68020

    Willis

    Joined:
    Apr 23, 2006
    Location:
    What feels like the middle of nowhere
    #14
    why use c++ when surely it would be more straight forward to use Obj-C...
     
  15. thread starter macrumors 65832

    benlangdon

    Joined:
    Jan 13, 2008
    #15
    its for my class...;)
     

Share This Page