![]() |
Another exercise i am stuck with
Hello friends,
i have a new problem with another exercise. It states like this: Imagine that we have a program that requires the informations of the user. for this purpose write a function Insert, that will look after the users informations. Because the function has to be general, its parameter should be a string, that has to be printed on the screen. If the user didn't write any informations the function returns NULL (char *Insert( char* )). The usage of the function is the following: Code:
char *name;My code looks like this: Code:
//POGL8_vaja2.cppthe second error is that if i write a name for instance Mark the program returns MarkM. I don't know what i did wrong thats why i am asking for your help. thanks a lot best regards, BoSCHoW. |
Re: Another exercise i am stuck with
Try giving good titles for better responses.
|
Re: Another exercise i am stuck with
Quote:
*point = *memory; Secondly, in the for loop you should use i=0 instead of i==0 (may be typing error). One more thing is clear_array function should not return anything. You should use void clear_array for it. |
| All times are GMT +5.5. The time now is 22:06. |