Re: cannot convert 'SDL_DisplayMode' to 'SDL_DisplayMode*
"speartip" <[email protected]> Thu, 09 Feb 2017 00:08:49 +0000
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <[email protected]> |
Deployed with changes; errors persistent:
Code:
horizontal = 0; vertical = 0;
SDL_DisplayMode dm;
cout<<"Gobot call:";
gobot(&horizontal,&vertical, &dm);
Code:
#include"SDL.h"
int SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * dm);
int gobot( int * horizontal, int * vertical, SDL_DisplayMode * dm);
Code:
#include "SDL.h"
#include "gobot.h"
int gobot( int * horizontal, int* vertical, &dm )
{
//SDL_GetDesktopDisplayMode(0, &dm);
*horizontal = dm->w;
*vertical = dm->h;
return 0;
}
error:
Code:
.\src\gobot.cpp:15:45: error: 'dm' has not been declared
int gobot( int * horizontal, int* vertical, dm )
^
..\src\gobot.cpp: In function 'int gobot(int*, int*, int)':
..\src\gobot.cpp:18:18: error: 'dm' was not declared in this scope
* horizontal = dm->w;
_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org