getCurrentDirectory issue..

closed account (y8h7M4Gy)
Hello...

I tried using getCurrentDirectory to load a sub folder of my program... but it just says

1
2
app.cpp: In function ‘bool load_files()’:
app.cpp:207: error: ‘getCurrentDirectory’ was not declared in this scope


here is my code...

1
2
3
4
5
6
	getCurrentDirectory ( "./images/char" );
	dot = load_image ( "dot.bmp" );
	getCurrentDirectory ( "./images/grounds" );
	block1 = load_image ( "block1.bmp" );
	getCurrentDirectory ( "./images/fonts" );
	font = TTF_OpenFont ( "lazy.ttf", 20 );


and if its an include problem then here are my headers...

1
2
3
4
5
6
7
8
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include "SDL/SDL_ttf.h"
#include <string>
#include <sstream>
#include <vector>
#include <cmath>
using namespace std;


Im on Ubuntu 10.04 and i am using g++ ( terminal ) to compile

ty in advance!
Last edited on
1. It's GetCurrentDirectory(), not getCurrentDirectory().
2. Those calls don't match the function signature:
DWORD GetCurrentDirectory(DWORD nBufferLength,LPTSTR lpBuffer);
3. It's a Windows function.
closed account (y8h7M4Gy)
Ok, i got it.. i just put...

1
2
3
	dot = load_image ( "./images/char/dot.bmp" );
	block1 = load_image ( "./images/grounds/block1.png" );
	font = TTF_OpenFont ( "./images/fonts/lazy.ttf", 20 );


i tried this before but i put block1.bmp instead of block1.png >_> lol

thanks anyway though
closed account (y8h7M4Gy)
thx but i got it!
Topic archived. No new replies allowed.