thanks guys i will keep this in mind as i study more c++ on my free time thanks I'll only post if im absolutely stuck but i think this experience will help me alot.
Type: Posts; User: dark21
thanks guys i will keep this in mind as i study more c++ on my free time thanks I'll only post if im absolutely stuck but i think this experience will help me alot.
ok i did exactly what you said it worked thanks guys. When you
type this in their it finds the sdl libraries that it was complaining about?
g++ -I/usr/include/SDL -lSDL -lSDL_image ...
Im using G++ a Linux compiler and runing it through the console
and i just copied this code line for line. how would i go about telling the compiler about the library.
I thought i did that...
lesson01.cpp:(.text+0x27): undefined reference to `SDL_Init'
lesson01.cpp:(.text+0x4b): undefined reference to `SDL_SetVideoMode'
lesson01.cpp:(.text+0x62): undefined reference to `SDL_RWFromFile'...
thanks guys. by indent you mean add this right
<<" lines of code ";<<
or do you mean i should dobule space my code or do both?
#include <iostream>
#include <string>
#include <ctime>
#include <cstdlib>
using namespace std;
int main( void )
{
srand(time(0)); // seed random number genrator
string name; // used to...