sdl in c++

This is a discussion on sdl in c++ within the C++ Programming forums, part of the General Programming Boards category; i wnat to learn to use sdl in c++ my freind gave me this site http://cone3d.gamedev.net/cgi-bin/in...s/gfxsdl/index but it tells u ...

  1. #1
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608

    sdl in c++

    i wnat to learn to use sdl in c++ my freind gave me this site
    http://cone3d.gamedev.net/cgi-bin/in...s/gfxsdl/index

    but it tells u as if ur programming in c, i cannot find any sdl sites so i want to know if i should learn c and then learn sdl, and try to use sdl stil in c++ somehow or find a tutorial for sdl in c++. i have a feeling if i try to use c sdl programmign skills into a c++ game, it will not work. so does anyone have nay suggestions or good sites with tutorials for sdl in c++ (using my compiler)
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  2. #2
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    Just a few weeks ago you just started C++. Just a few days ago you were trying to learn OpenGL weren't you? I suggest learning the language first... stick to console, get to know as much as you can before moving onto an API.

    Generally speaking.. if you know C++, then you know C. I don't see what's so foriegn about those tutorials, they seem like easy enough. Please tell, why can't you do those tutorials if you know C? Perhaps the API is C-Style, in any case, if you know C++ and are using a C++ compiler, theres no reason why you can't code with it.

  3. #3
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    i wasnt trying to learn opengl i was tryign to find some stuff for my freind, and c and c++ are stil different including heades etc. ie. to print info on c++ u use cout for c u use printf (thats all i know in c)
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  4. #4
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,493
    i believe you can. try it, and tell us if it doesn't work. better yet, tell us in the game forum.

  5. #5
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Sorry to break it to u, printf works in both. Try it out yourself, and you will see that.

  6. #6
    Registered User raimo's Avatar
    Join Date
    Jun 2002
    Posts
    107
    Ha, C++ includes headers like ctime, cstdlib, cstdio, cctype, and so on. Knowing these headers requires *some* knowledge about "C".

  7. #7
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    Oh... my sweet lord, they used printf! *head explodes*

  8. #8
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    ooooooooohhhhhhhh, so whoever made that tutoail just uses c commands in c++ programs or something?
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  9. #9
    Unregistered
    Guest

    Lightbulb Did you ever try this ?

    See this... it proves that MOST (we can say, almost all) c commads work in c++ ..

    Code:
    #include <stdio.h>          //for printf
    #include <iostream.h>    //for cout
    #include <stdlib.h>         //for getchar();
    
    main()
    {
        
         cout << "Hello C++" << endl;
        
         printf("Hello C\n");
    
         getchar();
    
    }
    So good luck programming.. use whatever commands
    that you're comfortable with, c or c++.. doesn't matter
    most of the time, especially with basic, moderate
    and some advanced programs.

    http://mahurshi.tripod.com/mainframes.htm

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SDL and stdio.h
    By a.mlw.walker in forum C Programming
    Replies: 1
    Last Post: 02-06-2009, 06:45 AM
  2. SDL + Newbie
    By Livijn in forum Game Programming
    Replies: 7
    Last Post: 04-30-2007, 11:20 PM
  3. Problems compiling this SDL app
    By Rider in forum C++ Programming
    Replies: 3
    Last Post: 03-27-2007, 12:22 PM
  4. SDL and MinGW Studio
    By Vicious in forum Tech Board
    Replies: 0
    Last Post: 07-30-2004, 09:59 PM
  5. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 12:19 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21