Priest of the Order of the Butterfly
Posts: 541 from 2013/5/29
Trying to debug a few lines of code I use Printf() because I cant use stdio printf() when I use SDL (I dont know why).
The problem is that Printf() doesnt show my data.
A little example:
Code:
include<stdio.h>
#include<proto/dos.h>
typedef struct datos
{
int x;
}datos;
datos misdatos;
datos *p_data = &misdatos;
void showdata(datos *data)
{
printf("Dato X: %dn", data->x);
}
int main()
{
p_data->x = 100;
showdata(p_data);
return 0;
}
If I use stdio version It works well but with DOS version it shows always Dato X: 0.
[ Edited by tolkien 10.11.2013 - 11:10 ]MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
Classic: Amiga 1200/060 - A500 PiStorm