Please help me fix these errors is the perfect title to be ignore. Next time avoid such "Please, help me" titles.
>"error C2664: 'sprintf' : cannot convert parameter 2 from 'int' to 'const char *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast"
sprintf() returns an int representing the number of successful written or a negative if it fails. The assignment to input, therefore, will not work, since input is a string. Remove the comas and spaces between "%d, %c, %f"
>"error C2562: 'assemble' : 'void' function returning a value: see declaration of 'assemble'"
void assemble(char*input, int num, char let, float flo) assemble returns a void, but you are telling it to return a string; return (input);
The prototype should be outside of main; void assemble(char*input, int num, char let, float flo);
The use of scanf() to read from user will return unsuspected results, especially after you enter a character and the return "ENTER" key.
scanf("%c", &let);
Last edited by Aia; Jan 4th, 2009 at 1:15 pm.
Reputation Points: 2224
Solved Threads: 218
Nearly a Posting Maven
Offline 2,304 posts
since Dec 2006