Hello,
So i know how to make the host load the functions from a DLL file, but how would I go about exposing the host's functions/classes/static members to the DLL, so the DLL can control the host?
Type: Posts; User: 39ster
Hello,
So i know how to make the host load the functions from a DLL file, but how would I go about exposing the host's functions/classes/static members to the DLL, so the DLL can control the host?
Would it be a good idea to use std::vector as a fast memory stream class?
std::vector<char> memoryStream;
Just wondering if the performance of this class would be sufficient as a generic...
I suppose i could. Anyways a little bit more looking around and i found out that variable arguments are alot more restrictive than i thought. I thought the program would pass "int num" but it turns...
I'm wondering if there is a way to deal with functions that can have a variable number of arguments passed to it. I already know of va_* functions but it doesn't seem that good. I was hoping there...
You could of just done:
char welcome[] = "GET /about/sites.html HTTP/1.1\r\n"
"Host: www.craigslist.org\r\n"
"Connection: close\r\n"
"\r\n";
Extra bytes at the top of the file? If that's the case then that is part of the header. It's probably a blank line which means end of header.
Yeah i was just thinking about using a map.
If i use a vector or list it's going to screw up the item placement. I want them to be able to choose which position to put the item. They can place the item in the 8th position even if they only...
Well it's part of their inventory:
class Player:
public Character
{
private:
...
Item items[9];
...
I'm pretty sure turning the precompiler off would break everything. It's pretty much essential.
The precompiler changes GetClassName to GetClassNameA.
const std::string& className = items[i].GetItemClass()->GetClassName();
Same with all the other words winuser.h defines
Somewhere within my code (i think maybe the SDL or opengl library) i'm including windows.h and this stupid file has a crap load of reserved words! I've already come across three function names i've...
Thank you.
I want to use a class like this:
Item item;
if(item)
{
....
}
Ok i figured out the answer for both questions. You can only initialize the value in the class header if it's an integer.
Hmm, should be able to use anonymous structures...?
A different problem. For some reason i get "obj\Release\src\Player.o:Player.cpp:(.text+0x144): undefined reference to `Player::JUMP_HEIGHT'...
For classes that have dynamic memory.
class string
{
private:
char* data;
size_t len;
}; If you let the compiler create a default copy constructor then it will copy the pointer for data...
I get errors when i try this:
class Player:
public Character
{
private:
static const float JUMP_HEIGHT = 13;
static const int REGEN_DELAY = 100;
static const int...
To change the value of a pointer you do this:
*day = 44;
Example:
int dateSplit(int dayOfYear, int year, int *day, int *month)
{
...
From gamedev.net:
Just try "c:\\Cliffhanger". It's already been explained why you need two backslashes.
I don't see any floats or pointers in your code...
I don't really get your question but maybe you want this: http://cboard.cprogramming.com/showthread.php?t=107099
EDIT: You also need to remove...
You can use binary operators.
int val = 64;
int i;
for(i = 7; i >= 0; --i)
printf("%d", (val & (1 << i)) > 0);
This will print 8 bits of the value. If you want to print...
Just do this:
void ChangeString(char* outStr, size_t outSize);
int main()
{
char myString[0xFF] = "";
ChangeString(myString, sizeof(myString));
printf("%s\n", myString);
return 0;
I think you can only use templates in header files..