Click here to Skip to main content
15,895,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Bob Stanneveld13-Jul-05 4:19
Bob Stanneveld13-Jul-05 4:19 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
David Crow13-Jul-05 5:43
David Crow13-Jul-05 5:43 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Bob Stanneveld13-Jul-05 20:27
Bob Stanneveld13-Jul-05 20:27 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Trollslayer12-Jul-05 21:58
mentorTrollslayer12-Jul-05 21:58 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
firebolt7712-Jul-05 23:09
firebolt7712-Jul-05 23:09 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
khan++12-Jul-05 23:11
khan++12-Jul-05 23:11 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Stlan12-Jul-05 23:26
Stlan12-Jul-05 23:26 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
firebolt7713-Jul-05 3:53
firebolt7713-Jul-05 3:53 
I already tried all the instructions, but still the program can't run. Although it doesn't generate error on compile process, but when I try to run it, it won't run. Here is my modified source code:
int main()
{
CFile m_LogFile,m_DataFile;
char* a=NULL;
m_DataFile.Open("E:\\data.txt", CFile::modeRead|CFile::shareDenyNone);
a = new char [m_DataFile.GetLength() + 1];
memset(a,0,m_DataFile.GetLength() + 1);
try
{
m_LogFile.Open("E:\\data1.txt", CFile::modeWrite|CFile::modeRead|CFile::modeCreate|CFile::modeNoTruncate|CFile::shareDenyNone);
m_LogFile.SeekToEnd();
}
catch(CException* e)
{
e->ReportError();
e->Delete();
}
m_DataFile.Read(a,m_DataFile.GetLength());
m_LogFile.Write(a,strlen(a));
m_DataFile.Close();
m_LogFile.Close();
return 0;
}
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Stlan13-Jul-05 3:59
Stlan13-Jul-05 3:59 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
David Crow13-Jul-05 5:45
David Crow13-Jul-05 5:45 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
David Crow13-Jul-05 3:18
David Crow13-Jul-05 3:18 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Joe Woodbury13-Jul-05 8:10
professionalJoe Woodbury13-Jul-05 8:10 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
firebolt7713-Jul-05 16:27
firebolt7713-Jul-05 16:27 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Joe Woodbury13-Jul-05 17:44
professionalJoe Woodbury13-Jul-05 17:44 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
firebolt7714-Jul-05 0:21
firebolt7714-Jul-05 0:21 
QuestionDatabase existense in SQL Server ? Pin
Babarsaeed12-Jul-05 19:11
Babarsaeed12-Jul-05 19:11 
AnswerRe: Database existense in SQL Server ? Pin
Christian Graus12-Jul-05 19:51
protectorChristian Graus12-Jul-05 19:51 
AnswerRe: Database existense in SQL Server ? Pin
basementman13-Jul-05 5:00
basementman13-Jul-05 5:00 
Generalstatic global variables problem Pin
VV114412-Jul-05 19:07
VV114412-Jul-05 19:07 
GeneralRe: static global variables problem Pin
Christian Graus12-Jul-05 19:47
protectorChristian Graus12-Jul-05 19:47 
GeneralRe: static global variables problem Pin
Bob Stanneveld12-Jul-05 21:04
Bob Stanneveld12-Jul-05 21:04 
GeneralRe: static global variables problem Pin
VV114413-Jul-05 7:06
VV114413-Jul-05 7:06 
GeneralRe: static global variables problem Pin
Bob Stanneveld13-Jul-05 20:28
Bob Stanneveld13-Jul-05 20:28 
GeneralXP-Style menu in win32 Pin
Anonymous12-Jul-05 18:36
Anonymous12-Jul-05 18:36 
GeneralRe: XP-Style menu in win32 Pin
Graham Bradshaw12-Jul-05 22:03
Graham Bradshaw12-Jul-05 22:03 

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.