Click here to Skip to main content
14,362,507 members

C / C++ / MFC

 
GeneralRe: Failure to remove folders after using CFileDialog DoModal Pin
Jochen Arndt16-Jun-15 3:24
mveJochen Arndt16-Jun-15 3:24 
GeneralRe: Failure to remove folders after using CFileDialog DoModal - **** FIXED (I think !) **** Pin
Still learning how to code16-Jun-15 3:54
memberStill learning how to code16-Jun-15 3:54 
GeneralRe: Failure to remove folders after using CFileDialog DoModal - **** FIXED (I think !) **** Pin
Jochen Arndt16-Jun-15 4:19
mveJochen Arndt16-Jun-15 4:19 
QuestionRe: Failure to remove folders after using CFileDialog DoModal Pin
David Crow16-Jun-15 5:21
memberDavid Crow16-Jun-15 5:21 
QuestionExisting VR Frame Renderers Pin
Trevor Johansen15-Jun-15 16:25
memberTrevor Johansen15-Jun-15 16:25 
QuestionLoad CSV file to a database in Windows 64bit Pin
aks.14-Jun-15 23:36
memberaks.14-Jun-15 23:36 
AnswerRe: Load CSV file to a database in Windows 64bit Pin
Jochen Arndt15-Jun-15 0:45
mveJochen Arndt15-Jun-15 0:45 
QuestionNew to C++ and Programming, Absolutely new Pin
Member 1176562614-Jun-15 19:36
memberMember 1176562614-Jun-15 19:36 
Hello eeryone, I am Mark, am attending Foothill College in SOCAL and I am cmpletely new to all of this. I am having trouble with my first assignment, I will show you. I am on DEV C++ :

#include
using namespace std;
int main()
{
cout<< "Tran says this is her first computer program.";
}
{ -----------------------------------------
intmain()
cout<< "Tran says that.";
cout<< "this is her first computer program.";
cout<< "Tran says this is her first computer program.";
cout<< "Tran says that,";
cout<< "this is her first computer program.";
cout<< "Tran said that, "This is my first computer program."";
cout<< "Train said that,.";
cout<< ""this is my first computer program."";
cout<< "Tran said that,.";
""this is my first computer program."";
cout<< "Tran said that.";
cout<< ""this is my first computer program."";

}

This is what My teacher said :

Hi Mark,

You can only have "int main()" once in your program. Once you put the close curly brace to end it, you can't have any more code below that. If you take another look through the lesson and the textbook reading, you'll see that all of the examples follow that pattern.

The solution is to put all of the cout statements inside the first set of curly braces, so you don't need any additional curly braces.

Dave

Now, I did this here and this is what happened :


#include
using namespace std;
int main()
{
cout<< "Tran says this is her first computer program.";
cout<< "Tran says that.";
cout<< "this is her first computer program.";
cout<< "Tran says this is her first computer program.";
cout<< "Tran says that,";
cout<< "this is her first computer program.";
cout<< "Tran said that, "This is my first computer program."";
cout<< "Train said that,.";
cout<< ""this is my first computer program."";
cout<< "Tran said that,.";
""this is my first computer program."";
cout<< "Tran said that.";
cout<< ""this is my first computer program."";

}

This is what my computer said :

( I want to post the Pic, I cannot copy and paste it down.Can somone show me how topost pics on here ? Thanks, If I cannot then I will privately email you. )

So I did what the teacher said to do and then I compile and got more lines all messed up. I am confused...

Thanks
AnswerRe: New to C++ and Programming, Absolutely new Pin
Amarnath S14-Jun-15 20:00
professionalAmarnath S14-Jun-15 20:00 
GeneralRe: New to C++ and Programming, Absolutely new Pin
Member 1176562614-Jun-15 20:26
memberMember 1176562614-Jun-15 20:26 
GeneralRe: New to C++ and Programming, Absolutely new Pin
Richard MacCutchan14-Jun-15 22:42
protectorRichard MacCutchan14-Jun-15 22:42 
QuestionAfxGetApp anomaly Pin
ForNow10-Jun-15 10:18
memberForNow10-Jun-15 10:18 
QuestionOdd property sheet behavior Pin
David Crow10-Jun-15 5:41
memberDavid Crow10-Jun-15 5:41 
AnswerRe: Odd property sheet behavior Pin
Chris Losinger10-Jun-15 6:26
professionalChris Losinger10-Jun-15 6:26 
QuestionAdd lib by pragma Pin
_Flaviu10-Jun-15 1:32
member_Flaviu10-Jun-15 1:32 
AnswerRe: Add lib by pragma Pin
David Crow10-Jun-15 3:46
memberDavid Crow10-Jun-15 3:46 
GeneralRe: Add lib by pragma Pin
_Flaviu11-Jun-15 0:25
member_Flaviu11-Jun-15 0:25 
Questionbad pointer error when I read a class object with CString member Pin
manoharbalu8-Jun-15 21:13
membermanoharbalu8-Jun-15 21:13 
Answer[Repost] Pin
Sascha Lefèvre8-Jun-15 21:36
professionalSascha Lefèvre8-Jun-15 21:36 
SuggestionRe: bad pointer error when I read a class object with CString member Pin
David Crow9-Jun-15 6:37
memberDavid Crow9-Jun-15 6:37 
AnswerRe: bad pointer error when I read a class object with CString member Pin
Stefan_Lang12-Jun-15 1:13
memberStefan_Lang12-Jun-15 1:13 
QuestionWindows 8.1 TouchScreen panning does not scroll window for MFC Scrollview or Win32 apps Pin
bob169727-Jun-15 8:10
memberbob169727-Jun-15 8:10 
AnswerRe: Windows 8.1 TouchScreen panning does not scroll window for MFC Scrollview or Win32 apps Pin
bob1697220-Jun-15 4:31
memberbob1697220-Jun-15 4:31 
Questionlinked list in C Pin
a random user7-Jun-15 5:28
membera random user7-Jun-15 5:28 
AnswerRe: linked list in C Pin
Chris Losinger9-Jun-15 5:55
professionalChris Losinger9-Jun-15 5:55 

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.