-
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)
-
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.
-
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)
-
i believe you can. try it, and tell us if it doesn't work. better yet, tell us in the game forum.
-
Sorry to break it to u, printf works in both. Try it out yourself, and you will see that.
-
Ha, C++ includes headers like ctime, cstdlib, cstdio, cctype, and so on. Knowing these headers requires *some* knowledge about "C".
-
Oh... my sweet lord, they used printf! *head explodes*
-
ooooooooohhhhhhhh, so whoever made that tutoail just uses c commands in c++ programs or something?
-
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