I get an addres of string from assembler into C, and I need to get content of this address.
How to do it? Google gives C++ examples with reinterpret_cast, but it not working in C (I suppose).
I will appreciate if you will note needed libs too, tenx
#include <stdio.h>
#include <stdlib.h>
unsigned long const1(void);
int main()
{
printf("Const: %d\n", const1());
return 0;
}
If you’ve already got the address and you know it’s a null terminated string, then all you need to do is treat it like a string.