Click here to Skip to main content
15,889,595 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with String Array Pin
CPallini11-Aug-10 1:18
mveCPallini11-Aug-10 1:18 
GeneralRe: Problem with String Array Pin
Nuri Ismail11-Aug-10 0:54
Nuri Ismail11-Aug-10 0:54 
GeneralRe: Problem with String Array Pin
CPallini11-Aug-10 1:17
mveCPallini11-Aug-10 1:17 
GeneralRe: Problem with String Array Pin
Nuri Ismail11-Aug-10 1:44
Nuri Ismail11-Aug-10 1:44 
AnswerRe: Problem with String Array Pin
Nuri Ismail11-Aug-10 0:51
Nuri Ismail11-Aug-10 0:51 
GeneralRe: Problem with String Array Pin
T.RATHA KRISHNAN11-Aug-10 0:59
T.RATHA KRISHNAN11-Aug-10 0:59 
GeneralRe: Problem with String Array Pin
Nuri Ismail11-Aug-10 1:04
Nuri Ismail11-Aug-10 1:04 
GeneralRe: Problem with String Array Pin
T.RATHA KRISHNAN11-Aug-10 1:19
T.RATHA KRISHNAN11-Aug-10 1:19 
This is the query at each iteration of the for loop and contents of the array at each iteration:


Select Name From Test WHERE Team ='Australia' ORDER BY RANDOM() LIMIT 11
SR Watson
SR Watson
SR Watson
SR Watson
SR Watson
SR Watson
SR Watson
SR Watson
SR Watson
SR Watson
SR Watson
Select Name From Test WHERE Team ='England' ORDER BY RANDOM() LIMIT 11
LJ Wright
LJ Wright
LJ Wright
LJ Wright
LJ Wright
LJ Wright
LJ Wright
LJ Wright
LJ Wright
LJ Wright
LJ Wright
Select Name From Test WHERE Team ='India' ORDER BY RANDOM() LIMIT 11
SR Tendulkar
SR Tendulkar
SR Tendulkar
SR Tendulkar
SR Tendulkar
SR Tendulkar
SR Tendulkar
SR Tendulkar
SR Tendulkar
SR Tendulkar
SR Tendulkar
Select Name From Test WHERE Team ='New Zealand' ORDER BY RANDOM() LIMIT 11
BB McCullum
BB McCullum
BB McCullum
BB McCullum
BB McCullum
BB McCullum
BB McCullum
BB McCullum
BB McCullum
BB McCullum
BB McCullum
Select Name From Test WHERE Team ='Pakistan' ORDER BY RANDOM() LIMIT 11
Naved-ul-Hasan
Naved-ul-Hasan
Naved-ul-Hasan
Naved-ul-Hasan
Naved-ul-Hasan
Naved-ul-Hasan
Naved-ul-Hasan
Naved-ul-Hasan
Naved-ul-Hasan
Naved-ul-Hasan
Naved-ul-Hasan
Select Name From Test WHERE Team ='South Africa' ORDER BY RANDOM() LIMIT 11
YA Abdulla
YA Abdulla
YA Abdulla
YA Abdulla
YA Abdulla
YA Abdulla
YA Abdulla
YA Abdulla
YA Abdulla
YA Abdulla
YA Abdulla
Select Name From Test WHERE Team ='Sri Lanka' ORDER BY RANDOM() LIMIT 11
UWMBCA Welegedara
UWMBCA Welegedara
UWMBCA Welegedara
UWMBCA Welegedara
UWMBCA Welegedara
UWMBCA Welegedara
UWMBCA Welegedara
UWMBCA Welegedara
UWMBCA Welegedara
UWMBCA Welegedara
UWMBCA Welegedara
Select Name From Test WHERE Team ='West Indies' ORDER BY RANDOM() LIMIT 11
AB Barath
AB Barath
AB Barath
AB Barath
AB Barath
AB Barath
AB Barath
AB Barath
AB Barath
AB Barath
AB Barath
Select Name From Test WHERE Team ='Zimbabwe' ORDER BY RANDOM() LIMIT 11
KM Dabengwa
KM Dabengwa
KM Dabengwa
KM Dabengwa
KM Dabengwa
KM Dabengwa
KM Dabengwa
KM Dabengwa
KM Dabengwa
KM Dabengwa
KM Dabengwa

No.of Players in the List: 11

Only one player name is assgned for all 11 array locations. If I execute the query using SQLBROWSER,it prints correct results(different 11 names). Why is it so?

I wonder why this printf statement:
printf("No.of Players in the List: %d \n",playerLst.size());
prints 11 even if it outputs 99 unique names. It has to print 99 only?
If I give printf inside the for loop it prints No. Players as 11 at each iteration.
GeneralRe: Problem with String Array Pin
Nuri Ismail11-Aug-10 1:42
Nuri Ismail11-Aug-10 1:42 
GeneralRe: Problem with String Array[Solved] Pin
T.RATHA KRISHNAN11-Aug-10 1:54
T.RATHA KRISHNAN11-Aug-10 1:54 
GeneralRe: Problem with String Array[Solved] Pin
Nuri Ismail11-Aug-10 2:51
Nuri Ismail11-Aug-10 2:51 
QuestionUnRegisterHotKey problem Pin
wikywin10-Aug-10 22:21
wikywin10-Aug-10 22:21 
AnswerRe: UnRegisterHotKey problem Pin
Niklas L10-Aug-10 22:46
Niklas L10-Aug-10 22:46 
GeneralRe: UnRegisterHotKey problem Pin
wikywin10-Aug-10 22:57
wikywin10-Aug-10 22:57 
GeneralRe: UnRegisterHotKey problem Pin
Niklas L10-Aug-10 23:07
Niklas L10-Aug-10 23:07 
GeneralRe: UnRegisterHotKey problem Pin
wikywin11-Aug-10 17:32
wikywin11-Aug-10 17:32 
GeneralRe: UnRegisterHotKey problem Pin
Niklas L11-Aug-10 20:58
Niklas L11-Aug-10 20:58 
AnswerRe: UnRegisterHotKey problem Pin
Luc Pattyn11-Aug-10 1:55
sitebuilderLuc Pattyn11-Aug-10 1:55 
GeneralRe: UnRegisterHotKey problem Pin
wikywin11-Aug-10 15:34
wikywin11-Aug-10 15:34 
GeneralRe: UnRegisterHotKey problem Pin
Luc Pattyn11-Aug-10 15:47
sitebuilderLuc Pattyn11-Aug-10 15:47 
QuestionAssigning multi valued string. Pin
T.RATHA KRISHNAN10-Aug-10 21:09
T.RATHA KRISHNAN10-Aug-10 21:09 
AnswerRe: Assigning multi valued string. Pin
Niklas L10-Aug-10 22:31
Niklas L10-Aug-10 22:31 
AnswerRe: Assigning multi valued string. Pin
Luc Pattyn11-Aug-10 1:58
sitebuilderLuc Pattyn11-Aug-10 1:58 
QuestionCan't use 'User-defined-Message' in APP class of dialog-based MFC application. Why? Pin
JongchanAhn10-Aug-10 18:01
JongchanAhn10-Aug-10 18:01 
AnswerRe: Can't use 'User-defined-Message' in APP class of dialog-based MFC application. Why? Pin
Cool_Dev10-Aug-10 18:20
Cool_Dev10-Aug-10 18:20 

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.