sweet, thanks!! currently hit a wall in my programming learning journey, will return with many questions after some good sleep :)
Type: Posts; User: Mike Beal
sweet, thanks!! currently hit a wall in my programming learning journey, will return with many questions after some good sleep :)
i noticed when i have a switch statement the default does not catch chars...
here is a sample-
int input;
cin>>input;
switch(input)
{
hey all, been a while (damn jobs)
so im familiar with the rand() function, and how to get a random number within a certain range, but as i was flipping through one of my books i noticed its...
so here you are declaring name as int (or string now that you've changed it) but you are telling the computer to display 'name' before any data is stored to it.. try flipping the order, also try...
ok so at times it is for convenience, and its also when you want variables to be 'related'... you say the numbers don't matter, how so? how else would the variables be defined or recognized if they...
right, i figured they would be helpful for larger amounts of data, but even still, is there that big of a difference between listing 100 variables in an enum versus listing 100 individually? i feel...
so I think i understand enums, but not quite seeing the use for them in code...
enum TreeType
{
maple, douglasFir, Alder
};
i know that the first enum is 0, unless otherwise...
good advice thanks. it will be very exciting when i can code the things I WANT to code, i feel like it will be more enjoyable coding it as well, knowing the final product i have in mind :)
very nice!! thanks! yea i figured "hey, alex guarantees I'll learn C++, or my money back so why the heck not!?" lol it is very fun indeed, it is however kinda frustrating when you have a great idea...
Thanks Matticus, Switch statements is next on my list of things to do!!
Phantomotap- I'm still pretty early on in learning (if you couldn't tell), and while i appreciate you taking the time to...
firstly, thank you very much grumpy for taking the time to do this.. now to answer your question, it seems to me that your code allows me to enter new candidates/options without adding other sections...
best thing I've learned (as I am a beginner too) is if you don't understand something, you may not be ready to tackle it yet.. I've often gone back and re learned the things I already knew, until...
i know this is jack poop to all you expert programmers out there, but I just wanted to share my last 45 minutes.. the real reason I feel good about this code i wrote is because i did the whole thing...
so essentially, its the same thing, functions are just to organize code a little better? I suppose if I were to use x*y (or another, more complicated equation) very often it would make sense to put...
i spotted a mistake while rewriting the code, line 11 should have been written cin>> x >> y; ugh caused like 15 mins worth of frustration over two arrows.. is this the life of a programmer!? ;) lol...
I'm trying.. really hard.. to think of another way....... but i can't. I don't think I know enough fundamentally to re-structure this into a more efficient code :/ are you speaking of my if...
very true, I'll make it a habit of being specific, as i can see it could cause problems down the road.. printing the winner would make more sense ;)
thanks mate
I assumed choosing 1-3 was obvious, i only put the "please choose between 1-3" in as a default message to anything BUT 1-3.
I'm still early in learning and lines 40+41 are the only way I know of...
this was the only coding exercise that I've had trouble with so far on this great learning adventure :)
just looking to see if there was a better way to do this, or if any tips could be thrown my...
thanks matticus, It does sound a better idea to learn everything first, which will allow for a faster, smoother coding later on. My head is filled with so many imaginative ideas and i just want them...
hello all, I'm working on an idea to make a text style game, but rather its more like a book. the setup is giving narratives, then 3-4 choices at the end. I want to make it very in depth, with...