Click here to Skip to main content
16,004,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: CFontDialog Pin
David Crow30-Aug-07 3:20
David Crow30-Aug-07 3:20 
AnswerRe: CFontDialog Pin
Jason Teagle30-Aug-07 3:24
Jason Teagle30-Aug-07 3:24 
GeneralRe: CFontDialog Pin
Try30-Aug-07 3:50
Try30-Aug-07 3:50 
GeneralRe: CFontDialog Pin
Jason Teagle30-Aug-07 10:07
Jason Teagle30-Aug-07 10:07 
QuestionPocketPC to PC file transfer [modified] Pin
shpid3r30-Aug-07 2:47
shpid3r30-Aug-07 2:47 
AnswerRe: PocketPC to PC file transfer Pin
Rajesh R Subramanian30-Aug-07 6:21
professionalRajesh R Subramanian30-Aug-07 6:21 
Questionsscanf, reading unknown number of variables Pin
Jim Warburton30-Aug-07 2:18
Jim Warburton30-Aug-07 2:18 
AnswerRe: sscanf, reading unknown number of variables Pin
jhwurmbach30-Aug-07 2:40
jhwurmbach30-Aug-07 2:40 
jimwawar wrote:
I am stuck on how to set the number of references '&temp[n]', to match the number of %f in the format string.


How about
std::vector<double> numbers;
std::stringstream str;
str <<< data_in;
for ( unsigned i = 0; i < number_count; ++i) {
  double d;
  str >> d;
  numbers.push_back( d);
}


You will end up with number_count doubles in the vector numbers.
You will need to improve the error checking, and you might want to use iterators here, if you feel fit.

Also, boost::lexical_cast[^] could be used to make this more programmer-friendly.



Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
George Orwell, "Keep the Aspidistra Flying", Opening words

GeneralRe: sscanf, reading unknown number of variables Pin
Jim Warburton30-Aug-07 2:50
Jim Warburton30-Aug-07 2:50 
AnswerRe: sscanf, reading unknown number of variables Pin
Nishad S30-Aug-07 2:45
Nishad S30-Aug-07 2:45 
GeneralRe: sscanf, reading unknown number of variables Pin
Jim Warburton30-Aug-07 2:50
Jim Warburton30-Aug-07 2:50 
GeneralRe: sscanf, reading unknown number of variables Pin
Nishad S30-Aug-07 2:55
Nishad S30-Aug-07 2:55 
QuestionAccessing remote (shared) files Pin
insignia30-Aug-07 2:05
insignia30-Aug-07 2:05 
AnswerRe: Accessing remote (shared) files Pin
David Crow30-Aug-07 3:12
David Crow30-Aug-07 3:12 
Questionhow to use group of radio button as single control? Pin
Banks K30-Aug-07 0:58
Banks K30-Aug-07 0:58 
AnswerRe: how to use group of radio button as single control? Pin
Naveen30-Aug-07 1:08
Naveen30-Aug-07 1:08 
AnswerRe: how to use group of radio button as single control? Pin
KarstenK30-Aug-07 1:19
mveKarstenK30-Aug-07 1:19 
AnswerRe: how to use group of radio button as single control? Pin
David Crow30-Aug-07 3:13
David Crow30-Aug-07 3:13 
Questionhow to get 32-bit graphics on EVC++ 4.0 SP4 Pin
mercenary0130-Aug-07 0:53
mercenary0130-Aug-07 0:53 
QuestionMFC Dialog Pin
Bhavesh Bagadiya30-Aug-07 0:49
Bhavesh Bagadiya30-Aug-07 0:49 
AnswerRe: MFC Dialog Pin
Naveen30-Aug-07 0:56
Naveen30-Aug-07 0:56 
GeneralRe: MFC Dialog Pin
Nishad S30-Aug-07 1:41
Nishad S30-Aug-07 1:41 
GeneralRe: MFC Dialog Pin
Naveen30-Aug-07 2:03
Naveen30-Aug-07 2:03 
GeneralRe: MFC Dialog Pin
Nishad S30-Aug-07 2:12
Nishad S30-Aug-07 2:12 
Questioncursor in readonly mode richedit control.. Pin
mirraa30-Aug-07 0:33
mirraa30-Aug-07 0:33 

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.