OK sorry, I knew that, I my brain just wasn't working at that time.
I will try to figure out my problems on my own before jumping to posting for now on, sorry guys
Type: Posts; User: PersianStyle
OK sorry, I knew that, I my brain just wasn't working at that time.
I will try to figure out my problems on my own before jumping to posting for now on, sorry guys
How come when I run this code:
#include <iostream>
using namespace std;
int main()
{
int examplearray[95];
examplearray[95] = 50;
Yes, OK i figured it out on my own, I have to set the values of the array. So I fixed my code.
#include <iostream>
using namespace std;
int main()
{
int examplearray[100];
int t;
I am learning C++ and I am currently learning Arrays.
However, I am stuck :(
I type the following code:
#include <iostream>
using namespace std;
int main()
{
No thanks, I hate reading books LoL
I been learning a lot better this way.
well I tried to put return; just to see and it compiled
But I just dont put a return statement at all and remove the line completely.
Is this correct?
When you say that is not standard C++ do you mean the code won't work or you just mean it is not good form or w\e
why do you say to have return; instead of return 0;
I tried it without putting return; at all and just completely removing that line and it worked fine?
Yes I know I should start out with having...
There are two ways I know you can do this:
1) After cin >> gallons; put cin.ignore();
Then put cin.get(); before return 0;
Example:
#include <iostream>
using namespace std;
int...
And to define and declare a function about the int main() I can just put it like this without the semicolon:
void NewGame()
{
// type code here
}
Or would I have to do it like this:
Oh OK, so basically instead of having this at the end of my defined function:
return 0;
I can just remove that and change the function from int NewGame() to void NewGame()
correct?
Also, in...
Well here is my new updated progarm:
#include <iostream>
using namespace std;
int newgame();
int restoregame();
int main()
So here is my new updated code and it does what I want it to do pretty much:
#include <iostream>
using namespace std;
int main()
{
int Selection = 0;
cout << "Welcome to BlackJack!...
OK Thank you, what my problem was that I didnt understand is that when I put the semi colon after the while loop it would make it an infinite loop
hmm... I understand that except for the last part where it says:
} while (HottestGirl == 0);
What is this there for?
Also, one thing this doesn't do is display "Selection: " before the...
OK, I am very new to C++ so if anything is incorrect or there is an easier way or whatever, please let me know.
Here is some code I wrote just to mess around and try to start a program. I was trying...
I don't understand.
I have:
while(HottestGirl==1||2||3||4)
And it does what I want it to do, which is keep asking for the selection no matter what the user enters.
ooooooOOOOOOOOOOOOOOOooooOOOooo ahhaha I feel so stupid for forgetting that
Thanks!
So when I put:
while(HottestGirl=1)
It is assigning 1 to the variable HottestGirl?
How would I make then so it is like if the variable HottestGirl equals 1, then go through the loop?
Hello
I was messing around with Microsoft Visual C++ 2008 Express.
I am new to programming and am trying to learn C++
So here is a simple program I made:
#include <iostream>
using...