Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Requesting C++ assistance!  (Read 2439 times)

Chris_24

  • Bay Watcher
    • View Profile
Re: Requesting C++ assistance!
« Reply #15 on: August 17, 2011, 04:00:13 am »

If you're talking about structs/classes, I think you should http://www.learncpp.com/
And if you meant loading from a file, there are tutorials for that as well, there :)
Logged

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Requesting C++ assistance!
« Reply #16 on: August 17, 2011, 03:50:45 pm »

puts only takes a single argument, you're passing two arguments. So, use printf or cout. (the error messages tell you the expected arguments for any function you're calling, in this case: const char *) printf takes variable numbers of arguments, but this behavior is rare in c++, cout uses stream operators, so it takes variable number of inputs as well

you can send multiple stuff to puts, but you have to concatenate the strings manually first then ensure they're caste to the type "const char *" from "char *" or "string". Basically it's a waste of time to do it this way
« Last Edit: August 17, 2011, 03:56:58 pm by Reelyanoob »
Logged

Moghjubar

  • Bay Watcher
  • Science gets you to space.
    • View Profile
    • Demon Legend
Re: Requesting C++ assistance!
« Reply #17 on: August 18, 2011, 12:19:26 am »

Are you planning on making it graphical eventually to make-a something like so? (saw this thread and threw something together rq in openGL to display.  By rq I mean an accursed laptop that tends to hit ;;;; ).



(Real reason I made this: bored at hospital sitting with family member, and already gone thru most of NeHe's openGL tutorials and other resources just reading without making anything.)
« Last Edit: August 18, 2011, 12:20:58 am by Moghjubar »
Logged
Steam ID
Making things in Unity
Current Project: Demon Legend
Also working on THIS! Farworld Pioneers
Mastodon
Pages: 1 [2]