![]() Preserved Topic: Java / C comparison (copy problem) (Page 1 of 1) |
|
---|---|
Maniac (V) Mad Scientist From: Rochester, New York, USA |
![]() In Java I could have a chunk of code as follows: code: char charArrayp[] = new char[20];
code: char charArray[20];
code: char stringCopy(char toCopy);
code: char stringCopy = stringCopy(stringArray);
|
Paranoid (IV) Inmate From: A graveyard of dreams |
![]() [edit] it didn't work as it was supposed to |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
![]() what are you trying to do, make a header or library or something? |
Paranoid (IV) Inmate From: Madison, Indiana, USA |
![]() To do what you want to do in C: code: char stringCopy = stringCopy(stringArray);
code: char * stringCopy(char * string)
|
Paranoid (IV) Inmate From: Madison, Indiana, USA |
![]() I forgot to mention that the reason you can do the following in Java: code: newString = stringCopy(string)
|
Maniac (V) Mad Scientist From: Rochester, New York, USA |
![]() |