Click here to Skip to main content
15,924,553 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to validate data in property sheet. Pin
jadhav1232-Jul-06 22:53
jadhav1232-Jul-06 22:53 
AnswerRe: How to validate data in property sheet. Pin
Viorel.2-Jul-06 23:15
Viorel.2-Jul-06 23:15 
GeneralRe: How to validate data in property sheet. Pin
jadhav1236-Jul-06 23:25
jadhav1236-Jul-06 23:25 
AnswerRe: How to validate data in property sheet. Pin
Rudolf Jan3-Jul-06 0:55
Rudolf Jan3-Jul-06 0:55 
QuestionVector Problem [modified] Pin
CornToeGoblin2-Jul-06 22:51
CornToeGoblin2-Jul-06 22:51 
QuestionRe: Vector Problem Pin
Sarath C2-Jul-06 22:58
Sarath C2-Jul-06 22:58 
AnswerRe: Vector Problem Pin
Cedric Moonen2-Jul-06 22:59
Cedric Moonen2-Jul-06 22:59 
AnswerRe: Vector Problem Pin
Viorel.2-Jul-06 23:06
Viorel.2-Jul-06 23:06 
I suppose "char * Name" field of all of your sIPlaylist objects keeps a pointer to a string which is build by gTrackName function. This string is overwritten by each execution of gTrackName function, that’s why you only see the last value.

A solution is to keep the name inside the sIPlaylist structure. You can first define it as

struct sIPlaylist
{
    char Name[100];
    int Position;
};
and then use string-copy function:

strcpy(tmp.Name, gTrackName(i));

In more elaborated program, you should use dynamic allocation, or better get the assistance of std::string class from STL. In MFC projects, you can use CString class.

I hope it helps.
GeneralRe: Vector Problem Pin
CornToeGoblin3-Jul-06 8:10
CornToeGoblin3-Jul-06 8:10 
Questionregarding popup menus for ListBox. Pin
happy_ram2-Jul-06 22:34
happy_ram2-Jul-06 22:34 
AnswerRe: regarding popup menus for ListBox. Pin
Hamid_RT2-Jul-06 22:42
Hamid_RT2-Jul-06 22:42 
AnswerRe: regarding popup menus for ListBox. Pin
Sarath C2-Jul-06 22:45
Sarath C2-Jul-06 22:45 
AnswerRe: regarding popup menus for ListBox. Pin
Viorel.2-Jul-06 22:53
Viorel.2-Jul-06 22:53 
QuestionHow to call Stored procedure in VC++ Pin
maharaja pandian2-Jul-06 22:13
maharaja pandian2-Jul-06 22:13 
AnswerRe: How to call Stored procedure in VC++ Pin
Hamid_RT2-Jul-06 22:53
Hamid_RT2-Jul-06 22:53 
AnswerRe: How to call Stored procedure in VC++ Pin
Sarath C2-Jul-06 22:55
Sarath C2-Jul-06 22:55 
Questionset cursor position in table in rich edit Pin
Chetan Sheladiya2-Jul-06 22:12
professionalChetan Sheladiya2-Jul-06 22:12 
AnswerRe: set cursor position in table in rich edit Pin
see me2-Jul-06 22:22
see me2-Jul-06 22:22 
Questionwhy bitmap save complete and not load complete Pin
Chetan Sheladiya2-Jul-06 22:08
professionalChetan Sheladiya2-Jul-06 22:08 
QuestionHow to call Stored procedure in VC++ Pin
maharaja pandian2-Jul-06 22:06
maharaja pandian2-Jul-06 22:06 
Questionsdi Pin
ashish dogra2-Jul-06 21:59
ashish dogra2-Jul-06 21:59 
AnswerRe: sdi Pin
Weiye Chen2-Jul-06 22:02
Weiye Chen2-Jul-06 22:02 
GeneralRe: sdi Pin
ashish dogra2-Jul-06 22:19
ashish dogra2-Jul-06 22:19 
GeneralRe: sdi Pin
Weiye Chen2-Jul-06 23:55
Weiye Chen2-Jul-06 23:55 
AnswerRe: sdi Pin
Hamid_RT2-Jul-06 22:22
Hamid_RT2-Jul-06 22:22 

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.