First  Prev  1  2  3  4  5  Next  Last
Kondo's C++ class
Sensei
3193 cr points
Send Message: Send PM GB Post
25 / M
Offline
Posted 8/6/08 , edited 8/6/08

Nyctophyll wrote:


fruitschinposamurai wrote:



1.
#include "stdafx.h" <--------
#include <iostream> <--------- was this right?
using namespace std; <------

int main()
{
cout << "Hello World!";
char a;
cin >> a;
return0;
}

2. The header file will become the message inside the .exe file?
3. The keywords are needed cuz those are the commands that will make the header show up in the window/screen.
4. Same as above, no valuable infos referring to cin >> a; cuz you will teach it to us on the next lesson.

5.It is needed cuz it puts the text directly on screen?


You get bonus points for active participation in class! But you did really well for someone who is brand new to programming.
here are the corrections






All students read this!

A header file is like a library (not quite but just think of it this way) it contains many little keywords like cout that the computer wouldn't know otherwise


So lets pretend you are making a research report on amino acids, you know somethings off the top of your head about what an amino acid is, but you still need to use things like books and websites, those books and websites are the header files. But you need a bibliography or your teacher (the compiler aka Visual Studio 2008 in your case) won't accept it
that is why we write #include <iostream>.

The extra information you are using are the keywords like cout and cin, but like the compiler we know somethings that do not need citations because they are in our heads, that is the case for some keywords like char. In some reports people write small numbers next to special words
to note where they are from or what they mean. In C++ we would write (the namespace like std)::(the function like cout), but if we want to skip that we put a special line that includes all of those keywords which is in this case using namespace std;. If you didn't understand this then I will explain it in another lesson.
Sensei
10250 cr points
Send Message: Send PM GB Post
31 / F / Kabuki District (...
Offline
Posted 8/6/08
( i was gonna buy the "C++ for Dummies" book, but i guess i can take this class now instead! )
Sensei
10136 cr points
Send Message: Send PM GB Post
24 / M / The Universe is a...
Offline
Posted 8/6/08

fruitschinposamurai wrote:



I get it now, I think they would understand you if you compare the topic your talking about with people cuz I really understand what you just explained.
Sensei
3193 cr points
Send Message: Send PM GB Post
25 / M
Offline
Posted 8/6/08

otae_san wrote:

( i was gonna buy the "C++ for Dummies" book, but i guess i can take this class now instead! )


Oh? You program otae-san? Well that's to be expected from a woman as beautiful and knowledgeable as Otae-san
Posted 8/6/08
I looked at the spoilers and now I know the answers. Oh well I will answer first next time so I won't have the urge to peek.
Sensei
10250 cr points
Send Message: Send PM GB Post
31 / F / Kabuki District (...
Offline
Posted 8/7/08

fruitschinposamurai wrote:


otae_san wrote:

( i was gonna buy the "C++ for Dummies" book, but i guess i can take this class now instead! )


Oh? You program otae-san? Well that's to be expected from a woman as beautiful and knowledgeable as Otae-san


(Thanks for teaching this class! this is actually pretty fun... i never got around to learning C++ in school. one of my co-workers is a software developer and i find some of the stuff that he does pretty interesting.. i guess i'm just curious b/c i like learning new things)
Sensei
10250 cr points
Send Message: Send PM GB Post
31 / F / Kabuki District (...
Offline
Posted 8/7/08
hehehe... this is NOT a shoutout to anyone..

Lesson 1, Gintama-style:



Sensei
3193 cr points
Send Message: Send PM GB Post
25 / M
Offline
Posted 8/7/08

otae_san wrote:

hehehe... this is NOT a shoutout to anyone..

Lesson 1, Gintama-style:





You forgot the exclamation mark. I haven't tried it before but if you use hexadecimal you should be able to write 切腹しろ, because C++ also takes characters in hexadecimal form.
Sensei
3193 cr points
Send Message: Send PM GB Post
25 / M
Offline
Posted 8/7/08

otae_san wrote:

hehehe... this is NOT a shoutout to anyone..

Lesson 1, Gintama-style:





Before you start to mess around with the program answer the questions I posted!
Sensei
10136 cr points
Send Message: Send PM GB Post
24 / M / The Universe is a...
Offline
Posted 8/7/08

otae_san wrote:

hehehe... this is NOT a shoutout to anyone..

Lesson 1, Gintama-style:





How did you take this pic out of your computer? Its not from the camera right?
Sensei
10250 cr points
Send Message: Send PM GB Post
31 / F / Kabuki District (...
Offline
Posted 8/7/08

Nyctophyll wrote:


otae_san wrote:

hehehe... this is NOT a shoutout to anyone..

Lesson 1, Gintama-style:





How did you take this pic out of your computer? Its not from the camera right?


Hello Sakamoto-san! i have a program called SnagIt for doing screencaps. You can edit the image too.

Sensei
10136 cr points
Send Message: Send PM GB Post
24 / M / The Universe is a...
Offline
Posted 8/7/08

otae_san wrote:


Nyctophyll wrote:


otae_san wrote:

hehehe... this is NOT a shoutout to anyone..

Lesson 1, Gintama-style:





How did you take this pic out of your computer? Its not from the camera right?


Hello Sakamoto-san! i have a program called SnagIt for doing screencaps. You can edit the image too.



Otae-san!! can you tell me how you got it? or did you bought it?
Sensei
3193 cr points
Send Message: Send PM GB Post
25 / M
Offline
Posted 8/7/08

Nyctophyll wrote:

Otae-san!! can you tell me how you got it? or did you bought it?


you told me you were experienced with a computer.....
If you are at this level I don't think you have the skill to install the legendary Eroge: "Moe Moe Super Ecchi!"
And to think I planned to give you the secrets to the legendary eroge, that is wanted by all males....
Sensei
10136 cr points
Send Message: Send PM GB Post
24 / M / The Universe is a...
Offline
Posted 8/7/08

fruitschinposamurai wrote:


Nyctophyll wrote:

Otae-san!! can you tell me how you got it? or did you bought it?


you told me you were experienced with a computer.....
If you are at this level I don't think you have the skill to install the legendary Eroge: "Moe Moe Super Ecchi!"
And to think I planned to give you the secrets to the legendary eroge, that is wanted by all males....


I have experience, I just wondered why mine didnt work -presses the button for the screen cap- well I can install eroge but I cant save the file in this computer (family), i would just save it on a USB drive HAHA!!
Sensei
3193 cr points
Send Message: Send PM GB Post
25 / M
Offline
Posted 8/7/08

Nyctophyll wrote:


fruitschinposamurai wrote:


Nyctophyll wrote:

Otae-san!! can you tell me how you got it? or did you bought it?


you told me you were experienced with a computer.....
If you are at this level I don't think you have the skill to install the legendary Eroge: "Moe Moe Super Ecchi!"
And to think I planned to give you the secrets to the legendary eroge, that is wanted by all males....


I have experience, I just wondered why mine didnt work -presses the button for the screen cap- well I can install eroge but I cant save the file in this computer (family), i would just save it on a USB drive HAHA!!


get an cough *external harddrive* cough
Sensei
17753 cr points
Send Message: Send PM GB Post
25
Offline
Posted 8/7/08 , edited 8/7/08


I have made some questions to make sure you read my lessons carefully
1. Find and fix all the errors in this program. There are 7 mistakes if you fix it one way and 8 if you fix it another way

#include "stdafx.h"
#include <iostream>

user namespace std;

int main()
{
cout << "Hello World!"
char a;
cin >> a;
return 0;\

}



2.What is a header file?
a list of commands?? in other words a command prompt i believe

3. Why do the keywords cout and cin need header files?
to follow commands in an order or when accessed

4. What is the keyword cout used for?
a command that does what u you want it to on the screen

BONUS
5. Why do you think quotation marks are needed when using the cout keyword?
(hint words are not the only thing cout and output onto a screen)

um .. uses quotation marks so it outputs all letters & numerals (so numbers wont be mistaken for commands)

i hope i got close on these >_< it takes alot for me to get something so u'll just hav to deal sensei
First  Prev  1  2  3  4  5  Next  Last
You must be logged in to post.