Created my first little game in C++ only

Is that from some udemy tut?
Watch out for mistakes with pointers, sometimes such thing can crash unreal and visual studio to desktop (or even blue screen). So make backups of whole project at least daily.
On rare occasion such crash corrupts everything.

impressive. next up a calculator

That is from a tutorial I was following along until … it stopped working LOL
I had to think on my feet and put my own code in there to make it work.
The first problem was that the 2nd int needed a value otherwise I get a build error.
I didn’t really know what to do so I “guessed” that I should probably just give it a value that is not the secret number.
And it worked.
I almost fell off my chair :slight_smile:
Oh and then the command line window kept closing on my right as the right before the end.
So I forum searched that and discovered: while (secretNum != ‘e’)
But it was something else in there than the secretNum I figured I had to put that in there and it worked.

So there was a tiny bit of thinking on my end :slight_smile:
For me its huge because yesterday was my first day with C++ :slight_smile:

Today I am going to try and code something on my own without following a tutorial.
I already built the calculator that was pretty easy.

I had an idea last night for a little quiz game and I want to huge variables and while loops and a little score system see if I can figure it out on my own :slight_smile:

The code is here:

#include <iostream>

using namespace std;

int main()

{

cout &lt;&lt; "TheLittleGuessingGame" &lt;&lt; endl;
cout &lt;&lt; "---------------------" &lt;&lt; endl;
cout &lt;&lt; "Coded in C++ in VS 2019 by Etienne Andlau" &lt;&lt; endl;
cout &lt;&lt; "A World of Clouds game www.WorldofClouds.com" &lt;&lt; endl;
cout &lt;&lt; "--------------------------------------------" &lt;&lt; endl;

int secretNum = 7;
int guess = 0;

while (secretNum != guess) {

    cout &lt;&lt; "Guess the secret number. Enter any number from 1 to 10: ";

    cin &gt;&gt; guess;

    if (secretNum != guess)

        cout &lt;&lt; "Nope. Try again." &lt;&lt; endl;

}

    cout &lt;&lt; "You Win!";

    while (secretNum != 'e');

    return 0;

}

The int guess = 0 I put in there myself the tutorial had it just as int guess and that didn’t work.

Already built a calculator and calendar too easy moving on today to try and code my own little quiz game :slight_smile:

:wink:

the sky is the limit with C++ you’ll never want to go back to silly spaggetti nonsense blueprints :slight_smile:

Sadly I am not really a coder so I will probably stick with BPies to build my games but I definitely want to learn to do more in CPP.
I know there are things you can do in CPP that you cant do in BPies so I do want to skill myself up with it.
I am having a ton of fun though I really want to take this further :slight_smile:
This is going to kill my weekend I can see that coming :slight_smile:

How to build a calendar using C++?
Would you give a reference to a source?

I just searched on YT for tuts. There are lots.
Here is one example: https://www.youtube.com/watch?v=rHBaOg5Bp7o