![]() |
|
#1
|
|||
|
|||
What do these errors mean?Hi, I'm doing a small program. I'm supposed to write a function named trimfrnt() that deletes all leading blanks from a C-string. Write the function using pointers. The function returns nothing. When I run the program I get these errors.
CPP / C++ / C Code:
CPP / C++ / C Code:
|
|
#2
|
|||
|
|||
Re: What do these errors mean?Quote:
It means that you don't have a main() function. Fix it by writing a main() function. In particular: To test your function write a main() function that calls trmfront() with an argument that is a C-string with leading spaces. Regards, Dave |
|
#3
|
|||
|
|||
Re: What do these errors mean?The function you wrote trims the trailing spaces from the C string, not the leading ones, although the name (and also your description of the function) suggests otherwise.
Does the function really do what you intended ? PS: Perhaps is not necessary to put a return statement exactly at the end of your function, as it returns void. Best regards, Lurch. |
|
#4
|
||||
|
||||
Re: What do these errors mean?Quote:
Gomez __________________
Age is unimportant -- except in cheese |
Recent GIDBlog
Toyota - 2008 September Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Link Errors | jdbrine | C++ Forum | 10 | 18-Jun-2006 14:55 |
| Compile Errors due to Default Parameters | jdbrine | C++ Forum | 1 | 17-Jun-2006 14:45 |
| getting following errors in vc++ | angel188 | MS Visual C++ / MFC Forum | 4 | 13-Jun-2006 14:10 |
| syntax errors in document | coder | MS Visual C++ / MFC Forum | 0 | 11-Mar-2006 04:12 |
| In Need of Some Serious Help...compiling errors [C++] | needcishelp | C++ Forum | 25 | 21-Dec-2005 01:26 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The