find a problem in compiling following program...

Started by DXL, November 30, 2004, 11:43:22 AM

Previous topic - Next topic

DXL

#include <stdio.h>
#define TEXT "hello"
static char* ptr1=(char*) 0x400040;
static char* ptr2=(char*) 0x400040+sizeof(TEXT)+1;

void main()
{
printf("%s",ptr1);
printf("%s",ptr2);
}

the string "hello" is put in the bins of the exe i got, normally it wouldnt happen!!
how to bypass that?

Pelle

When you use sizeof, TEXT/"Hello" is referenced and will be emitted. No way around this. If it's easy, I will try to change it - but it has not very high priority...

Pelle
/Pelle