Robert Ryan wrote:
> thanks: 
> 
>   void order_char(char *);
>    
>   int main()
>   {        void order_char(char *arr);  }
>    
>   void order_char(char *arr)
>    
>   [EMAIL PROTECTED] ~/CSSp08]$ vi cs206-4.cpp
>   [EMAIL PROTECTED] ~/CSSp08]$ gcc cs206-4.cpp
>   [EMAIL PROTECTED] ~/CSSp08]$ ./a.out
>   Enter three characters:

Just because something compiles and runs does NOT make it correct code. 
  I have no idea why you made the parameter name the same and put the 
return type into main().  It looks weird.

When writing code, "winging it"/throwing code around and hoping it 
compiles/runs will NOT work.  Doing that in this industry, will only 
cause you to end up being frustrated with yourself and your job and 
everyone around you will also be frustrated with you.

You need to start reading a good C++ book or two and stop winging it. 
Your messages continually indicate to me that you want us to 
write/rewrite your code verbatim so that it works with the compiler and 
runs.  It also seems to me that you expect us to read your mind half the 
time.  This list is here to help you if you are stuck.  We don't provide 
answers like what you are after because we are trying to get you to 
learn the language.  You've got to start meeting us halfway or there 
will likely be some very frustrated people.

It also looks like you are taking a college course - don't assume you 
can learn C++ by merely sitting in class and taking notes.  You still 
have to read the book for the course.  However, supplementing both the 
course, coursework, and course book with a GOOD C++ book is a good idea 
so you learn the language the right way, the first time.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to