*I don't really know what to title this...sorry
I am taking a class to learn c++. But throughout the class all we did were make simple program using visual studio 08 with one source file. We are using C++ Programming :Program design Including Data structures by D.S. Malik. We are at chapter 7 right now, which is basically reference parameters and void functions. But he really never explained the basic structure of a project. I was looking around visual studio and I have a few questions.
In all the programs that we have made, all the headers(#include <iostream>...etc) are
in the top of the cpp file in the source folder. Why is there a folder that is named header files then?
What are the resource files?
Can there be more than one cpp file in the source file? If so, why?
All the project types that we make are win32 console application. What is the purpose of this type of application and what are some other application used? What are their benefits and what makes them different?
Are the header files(#include <iostream>...etc) always the same in any situation? How can you change the name? Does it make a difference?
Are there any other using namespace kind of things? Is there a specific name for these lines?
When I was playing around with the different project types(win32 console application...etc), I put in a code from a cpp file into a different project type and it doesn't run. Any special reason?
The return function always confuses me for some reason. My teacher told me that the return 0; basically says to the program that it will return 0 errors. I dont really understand what that mean. Can anyone explain?
Also in function the return function returns the value that you want. Does the return function act differently in different areas of the code? What excatly does the return do?And what is the meaning of the number after it?
Are all compilers pretty much the same? What are some good other kinds? What are the differences?
Are global variables the same thing as constant variables? What is the difference?
Also when calling for an input from a file, using the fstream, why do you have to declare the instream and ofstream? Are they not already part of the library? Can you delcare them to be any name or does it have to be infile and outfile?
When using the fstream do you have to declare your variables globally for the variables to work in a separate function or is it fine declaring them in the main function?
Finally anyone got any tips or interesting about microsoft visual studio 2008?
Sorry for writing an essay for this. I hope this is the right place to post this. I just really want to learn this. I feel that another question is going to pop into my head after I post this...Thanks.
Edited 6 Years Ago by emcyroyale: n/a