Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How Can I build an Array of Arrays? Pin
Code-o-mat5-Jun-09 7:30
Code-o-mat5-Jun-09 7:30 
Questionabout linker error in the C code of CSmtp_v1_5 (unable to compile the main.cpp file due to linker error) Pin
WindowsVsLinux5-Jun-09 2:50
WindowsVsLinux5-Jun-09 2:50 
QuestionRe: about linker error in the C code of CSmtp_v1_5 (unable to compile the main.cpp file due to linker error) Pin
CPallini5-Jun-09 5:15
mveCPallini5-Jun-09 5:15 
QuestionCopy files and directory C\Win32 no MFC Pin
aurelcly5-Jun-09 2:38
aurelcly5-Jun-09 2:38 
AnswerRe: Copy files and directory C\Win32 no MFC Pin
David Crow5-Jun-09 2:51
David Crow5-Jun-09 2:51 
Questionhow to display vector values in .txt file in mfc Pin
pinky88845-Jun-09 2:12
pinky88845-Jun-09 2:12 
AnswerRe: how to display vector values in .txt file in mfc Pin
Chris Losinger5-Jun-09 2:39
professionalChris Losinger5-Jun-09 2:39 
AnswerRe: how to display vector values in .txt file in mfc Pin
Stuart Dootson5-Jun-09 2:47
professionalStuart Dootson5-Jun-09 2:47 
Another alternative, just because I like STL algorithms Smile | :)

#include <fstream>
#include <iterator>
#include <algorithm>

std::vector<std::string> myVector;
myVector.push_back("a string");
myVector.push_back("another string");

std::ofstream file_op("c:\\vector.txt");
std::copy(myVector.begin(), myVector.end(), std::ostream_iterator<std::string>(file_op, "\n"));
file_op.close();


The other question is - why can't you see the values of the vector - is there possibly some way round that?

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: how to display vector values in .txt file in mfc Pin
Chris Losinger5-Jun-09 2:49
professionalChris Losinger5-Jun-09 2:49 
GeneralRe: how to display vector values in .txt file in mfc Pin
Stuart Dootson5-Jun-09 3:02
professionalStuart Dootson5-Jun-09 3:02 
Question3d array [modified] Pin
roshinisachi5-Jun-09 0:41
roshinisachi5-Jun-09 0:41 
QuestionRe: repost Pin
CPallini5-Jun-09 0:48
mveCPallini5-Jun-09 0:48 
AnswerRe: 3d array Pin
roshinisachi5-Jun-09 2:29
roshinisachi5-Jun-09 2:29 
QuestionRe: 3d array Pin
CPallini5-Jun-09 2:33
mveCPallini5-Jun-09 2:33 
AnswerRe: 3d array Pin
roshinisachi5-Jun-09 2:40
roshinisachi5-Jun-09 2:40 
QuestionRe: 3d array Pin
CPallini5-Jun-09 3:10
mveCPallini5-Jun-09 3:10 
AnswerRe: 3d array Pin
roshinisachi5-Jun-09 4:23
roshinisachi5-Jun-09 4:23 
QuestionRe: 3d array Pin
CPallini5-Jun-09 5:07
mveCPallini5-Jun-09 5:07 
AnswerRe: 3d array Pin
roshinisachi5-Jun-09 6:14
roshinisachi5-Jun-09 6:14 
NewsRe: 3d array Pin
CPallini5-Jun-09 6:16
mveCPallini5-Jun-09 6:16 
QuestionGPI Triggers Pin
ZMA_BUNTS4-Jun-09 22:28
ZMA_BUNTS4-Jun-09 22:28 
AnswerRe: GPI Triggers Pin
Stuart Dootson4-Jun-09 22:41
professionalStuart Dootson4-Jun-09 22:41 
QuestionMerging Xml files Pin
siva4554-Jun-09 21:36
siva4554-Jun-09 21:36 
AnswerRe: Merging Xml files Pin
Stuart Dootson4-Jun-09 22:44
professionalStuart Dootson4-Jun-09 22:44 
GeneralRe: Merging Xml files Pin
siva4554-Jun-09 23:02
siva4554-Jun-09 23:02 

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.