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

C / C++ / MFC

 
AnswerRe: Not access to child dialog object... Assert Error.. Pin
aquawicket16-Apr-07 17:32
aquawicket16-Apr-07 17:32 
Questioncrypto and stego..? Pin
Software_Specialist16-Apr-07 13:11
Software_Specialist16-Apr-07 13:11 
AnswerRe: crypto and stego..? Pin
Dmitry Khudorozhkov16-Apr-07 14:37
Dmitry Khudorozhkov16-Apr-07 14:37 
Questiongetline help Pin
arbster116-Apr-07 10:56
arbster116-Apr-07 10:56 
AnswerRe: getline help Pin
toxcct16-Apr-07 11:08
toxcct16-Apr-07 11:08 
GeneralRe: getline help Pin
arbster116-Apr-07 11:10
arbster116-Apr-07 11:10 
GeneralRe: getline help Pin
toxcct16-Apr-07 11:14
toxcct16-Apr-07 11:14 
AnswerRe: getline help Pin
Stephen Hewitt16-Apr-07 18:08
Stephen Hewitt16-Apr-07 18:08 
Try something like this:
========================

// Console.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream> // For "cout" and "cerr".
#include <fstream> // For "ofstream" and "ifstream"
#include <string> // For "string"
#include <cstddef> // For "size_t"

int main()
{
using namespace std;

// Open the output file.
ofstream outFile("C://allfile.txt");
if (!outFile)
{
cerr << "Failed to open output file!" << endl;
return 1;
}

static const string months[] = {"01","02","03","04","05","06","07","08","09","10","11","12"}; // these are all the months in the files
static const string years[] = {"1999","2000","2001","2002","2003","2004","2005","2006"}; // and these are all the years

for (size_t m=0; m<sizeof(months)/sizeof(months[0]); ++m)
{
for (size_t y=0; y<sizeof(years)/sizeof(years[0]); ++y)
{
// Build the filename.
string fname = "E:\\Month\\" + months[m] + "_" + years[y] + ".txt";

// Attempt to open the input file.
ifstream inFile(fname.c_str());
if (inFile)
{
// We opened it so append it the the output file.
cout << "Appending '" << fname << "'..." << endl;
outFile << inFile.rdbuf();
}
else
{
// We failed to open it.
cout << "File '" << fname << "' not found!" << endl;
}
}
}

return 0;
}


Steve

GeneralRe: getline help Pin
toxcct16-Apr-07 20:28
toxcct16-Apr-07 20:28 
GeneralRe: getline help Pin
Stephen Hewitt16-Apr-07 20:34
Stephen Hewitt16-Apr-07 20:34 
AnswerRe: getline help Pin
wucy121316-Apr-07 18:12
wucy121316-Apr-07 18:12 
QuestionVS2005 Component Gallery Pin
DRHuff16-Apr-07 10:55
DRHuff16-Apr-07 10:55 
AnswerRe: VS2005 Component Gallery Pin
Arman S.16-Apr-07 20:36
Arman S.16-Apr-07 20:36 
QuestionAccessing windows user account properties Pin
ramesh_hp200616-Apr-07 10:22
ramesh_hp200616-Apr-07 10:22 
QuestionRe: Accessing windows user account properties Pin
sthotakura16-Apr-07 11:19
sthotakura16-Apr-07 11:19 
QuestionCOM classes and pointers Pin
prithaa16-Apr-07 8:47
prithaa16-Apr-07 8:47 
AnswerRe: COM classes and pointers Pin
sthotakura16-Apr-07 8:50
sthotakura16-Apr-07 8:50 
GeneralRe: COM classes and pointers Pin
prithaa16-Apr-07 9:11
prithaa16-Apr-07 9:11 
AnswerRe: COM classes and pointers Pin
sthotakura16-Apr-07 9:29
sthotakura16-Apr-07 9:29 
GeneralRe: COM classes and pointers Pin
prithaa16-Apr-07 18:57
prithaa16-Apr-07 18:57 
GeneralRe: COM classes and pointers Pin
sthotakura16-Apr-07 21:03
sthotakura16-Apr-07 21:03 
QuestionBitmaps to video Pin
bankai12316-Apr-07 6:58
bankai12316-Apr-07 6:58 
AnswerRe: Bitmaps to video Pin
Mark Salsbery16-Apr-07 7:12
Mark Salsbery16-Apr-07 7:12 
GeneralRe: Bitmaps to video Pin
bankai12316-Apr-07 8:04
bankai12316-Apr-07 8:04 
GeneralRe: Bitmaps to video Pin
Mark Salsbery16-Apr-07 8:15
Mark Salsbery16-Apr-07 8:15 

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.