Click here to Skip to main content
15,915,324 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: template function [modified] Pin
swjam6-Aug-07 18:58
swjam6-Aug-07 18:58 
GeneralRe: template function Pin
Steve Echols6-Aug-07 19:17
Steve Echols6-Aug-07 19:17 
AnswerRe: template function Pin
Michael Dunn7-Aug-07 12:37
sitebuilderMichael Dunn7-Aug-07 12:37 
QuestionCalling a routine in a dll from the command line. Pin
firesteel6-Aug-07 0:16
firesteel6-Aug-07 0:16 
AnswerRe: Calling a routine in a dll from the command line. Pin
Stuart Dootson6-Aug-07 1:19
professionalStuart Dootson6-Aug-07 1:19 
GeneralRe: Calling a routine in a dll from the command line. Pin
firesteel6-Aug-07 2:21
firesteel6-Aug-07 2:21 
GeneralRe: Calling a routine in a dll from the command line. Pin
Stuart Dootson6-Aug-07 6:01
professionalStuart Dootson6-Aug-07 6:01 
QuestionCorrect/Best way to do convert int to string as uppercase hex ? Pin
Defenestration5-Aug-07 10:59
Defenestration5-Aug-07 10:59 
The following code will generate a random integer, then format this in uppercase hexidecimal, and then copy it to a std:string. Is there a better way of doing formatted output to a std:string ?

std::string		sRandomString;<br />
std::ostringstream	osRandomString;<br />
int			x;<br />
<br />
x = (rand() << 16) | rand();<br />
osRandomString << std::hex << std::uppercase << x; // formatted as uppercase unsigned hexadecimal integer<br />
sRandomString = osRandomString.str();<br />
<br />


Why does it not work correctly when I use std::ostringstream::hex and std::ostringstream::uppercase ?

If I want to create multiple random strings by using a loop, am I right in thinking I just need to place the following line at the end of the loop, so that the next string generated will overwrite the previous string in the stream, instead of being appended to it ?

osRandomString.seekp(0);


Is it necessary to place << endl or << ends after x where the formatting takes place ?

eg. osRandomString << std::hex << std::uppercase << x << endl;

If yes, should I use endl or ends ?
AnswerRe: Correct/Best way to do convert int to string as uppercase hex ? Pin
Stuart Dootson6-Aug-07 6:07
professionalStuart Dootson6-Aug-07 6:07 
QuestionDisplaying jpeg image sequences with ATL only Pin
p_4732-Aug-07 0:19
p_4732-Aug-07 0:19 
Questioni neeeeeeeed hlppppppp Pin
topekash20001-Aug-07 3:13
topekash20001-Aug-07 3:13 
AnswerTroll alert Pin
Chris Losinger1-Aug-07 3:30
professionalChris Losinger1-Aug-07 3:30 
GeneralRe: Troll alert Pin
Jonathan [Darka]1-Aug-07 4:12
professionalJonathan [Darka]1-Aug-07 4:12 
AnswerYou definitely need help, but... Pin
CPallini1-Aug-07 4:27
mveCPallini1-Aug-07 4:27 
QuestionMethods not getting generated by wizard [modified] Pin
KASR11-Aug-07 0:16
KASR11-Aug-07 0:16 
AnswerRe: Methods not getting generated by wizard Pin
_Leviathan_1-Aug-07 4:42
_Leviathan_1-Aug-07 4:42 
GeneralRe: Methods not getting generated by wizard Pin
KASR11-Aug-07 19:01
KASR11-Aug-07 19:01 
GeneralRe: Methods not getting generated by wizard Pin
KASR17-Aug-07 1:56
KASR17-Aug-07 1:56 
QuestionProblem with keyboard input in Composite ATL control Pin
_Leviathan_31-Jul-07 21:52
_Leviathan_31-Jul-07 21:52 
QuestionHow to override CWinDataExchange Pin
paulb31-Jul-07 15:22
paulb31-Jul-07 15:22 
AnswerRe: How to override CWinDataExchange Pin
Stuart Dootson31-Jul-07 21:10
professionalStuart Dootson31-Jul-07 21:10 
GeneralRe: How to override CWinDataExchange Pin
paulb1-Aug-07 13:21
paulb1-Aug-07 13:21 
GeneralRe: How to override CWinDataExchange Pin
Stuart Dootson1-Aug-07 21:25
professionalStuart Dootson1-Aug-07 21:25 
Questiontell me how to crack maya unlimite Pin
sonarat30-Jul-07 2:35
sonarat30-Jul-07 2:35 
AnswerRe: tell me how to crack maya unlimite Pin
Jonathan [Darka]30-Jul-07 7:00
professionalJonathan [Darka]30-Jul-07 7:00 

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.