Ok this might seem kinda a small problem but why can't I do this?
char *temp="Hello";
char *temp2;
sprintf(temp2, "%sWorld, temp);
Type: Posts; User: ExtremelyStupid
Ok this might seem kinda a small problem but why can't I do this?
char *temp="Hello";
char *temp2;
sprintf(temp2, "%sWorld, temp);
Ok here is the problem I need to sent to a function a number for example 2. This is the amount of strings I wish to enter into an array of a struct.
The struct for example may have 3 char* like...
How come on this page http://ccrma.stanford.edu/planetccrma/man/man3/stdarg.3.html
The author can use while(*fmt)?
I thought at the end of the list it would automatically equal NULL.
Err I changed some of my original program so that my code wouldn't take up the whole page. It was suppose to be taken out. Also thank you. It works :)!. If anyone can figure out a way to not have...
Ok here is my problem:
I have a bunch of strings like this:
unsigned char hello[]="hello";
unsigned char goodbye[]="goodbye";
Now I have a struct with different values in it:
typedef...
This is part of a game engine for another platform. Its gonna be open source so I don't want people to have to pass in pointers. Its not for me to use. This is not the exact code but it shows what...
Err typo. I fixed it in my original program still same result. It was suppose to be Data numbers;
Ok I wanna create a program that displays some numbers. I don't wanna use pointers for a reason but its kinda complicated. Anyway heres my code can anyone tell me a way to make it work?
Working...
Something more like this:
int x1=5,x2=3,x3=4,
char nameofint[3];
printf("Enter name of integer\n");
gets(nameofint);
int uselessint;
uselesss=nameofint;.//I want uselessint to equal 5 if...
Err ok let me try to explain it better:
I have lets say 3 integers.
int x1;
int x2;
int x3;
Now I have a string. Lets call this string nameofint:
Ok I have an array but I need to get a char array and make it actually equal the name of the array and use it accordingly. For example.
int hello[3];
char nameofarray[]="hello";
I want it...