Click here to Skip to main content
15,918,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: please help me this is urgent Pin
27-Jan-02 15:13
suss27-Jan-02 15:13 
GeneralRe: please help me this is urgent Pin
Michael Dunn27-Jan-02 17:19
sitebuilderMichael Dunn27-Jan-02 17:19 
Questioninput reading? Pin
marouane miftah el kheir27-Jan-02 13:00
marouane miftah el kheir27-Jan-02 13:00 
AnswerRe: input reading? Pin
borland27-Jan-02 14:52
borland27-Jan-02 14:52 
Questionreturning arrays? Pin
marouane miftah el kheir27-Jan-02 11:18
marouane miftah el kheir27-Jan-02 11:18 
AnswerRe: returning arrays? Pin
Matt Gullett27-Jan-02 11:25
Matt Gullett27-Jan-02 11:25 
GeneralRe: returning arrays? Pin
Nemanja Trifunovic27-Jan-02 12:12
Nemanja Trifunovic27-Jan-02 12:12 
GeneralRe: returning arrays? Pin
Matt Gullett27-Jan-02 12:27
Matt Gullett27-Jan-02 12:27 
You are correct, he asked for an "array of characters" and I assumed he wanted a string.

To return an array with no predefined terminators or size, you could do one of several things.

1. Create a custom class to deal with it.
2. Instead of using a return value, use function parameters

void SomeFunction(char** pszValue, int& iLen);
This would be good if the function needed to determine the length and allocate the memory.

OR

void SomeFunction(char* pszValue, int iMaxLen);
This would be good if the function just needed a pre-exising array of max size.

3. Use a byte array and use the first N bytes to specify the length.

I am sure there are many other ways to do this also.

Matt Gullett
GeneralRe: returning arrays? Pin
alex.barylski27-Jan-02 19:56
alex.barylski27-Jan-02 19:56 
QuestionHow to move/copy a file!? Pin
Rickard Andersson2027-Jan-02 10:43
Rickard Andersson2027-Jan-02 10:43 
AnswerRe: How to move/copy a file!? Pin
Matt Gullett27-Jan-02 10:56
Matt Gullett27-Jan-02 10:56 
AnswerRe: How to move/copy a file!? Pin
Vladimir Georgiev27-Jan-02 12:51
Vladimir Georgiev27-Jan-02 12:51 
GeneralRe: How to move/copy a file!? Pin
Rickard Andersson2027-Jan-02 21:01
Rickard Andersson2027-Jan-02 21:01 
Generalerror C2504 Pin
aleyah27-Jan-02 8:23
aleyah27-Jan-02 8:23 
GeneralRe: error C2504 Pin
Christian Graus27-Jan-02 10:03
protectorChristian Graus27-Jan-02 10:03 
GeneralRe: error C2504 Pin
borland27-Jan-02 14:54
borland27-Jan-02 14:54 
GeneralOLE-DB connections Pin
User 988527-Jan-02 7:00
User 988527-Jan-02 7:00 
General.NET And GUI Programming :: C++ Pin
valikac27-Jan-02 5:32
valikac27-Jan-02 5:32 
GeneralRe: .NET And GUI Programming :: C++ Pin
Amanjit Gill27-Jan-02 5:38
Amanjit Gill27-Jan-02 5:38 
GeneralRe: .NET And GUI Programming :: C++ Pin
valikac27-Jan-02 6:04
valikac27-Jan-02 6:04 
GeneralRe: .NET And GUI Programming :: C++ Pin
Amanjit Gill27-Jan-02 6:26
Amanjit Gill27-Jan-02 6:26 
GeneralRe: .NET And GUI Programming :: C++ Pin
valikac27-Jan-02 9:13
valikac27-Jan-02 9:13 
GeneralRe: .NET And GUI Programming :: C++ Pin
Christian Graus27-Jan-02 11:06
protectorChristian Graus27-Jan-02 11:06 
GeneralRe: .NET And GUI Programming :: C++ Pin
valikac27-Jan-02 11:17
valikac27-Jan-02 11:17 
GeneralRe: .NET And GUI Programming :: C++ Pin
Amanjit Gill27-Jan-02 11:44
Amanjit Gill27-Jan-02 11:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.