Beginners - August 2016 (Page 22)

Does "return x" in main() destruct objects ?
 
To my understanding , a return instruction in any function, should lead to leaving the function block and calling the destructor of local objects. In additio...
[6 replies] Last: [quote=dhayden]you're using std::cout and it's completely possible tha... (by Cubbi)
while loop dis-functioning or random generator
 
write your question here. I'm not sure what is wrong with my while loop. the battle simulator isn't working as i thought it should. Sometimes it will simple ...
[3 replies] Last: > the user is inputting the number of skeletons so i thought it wasn't... (by ne555)
C++ while Loop not exiting.
 
When i Execute my program everything seem to run perfect. but when i type N to exit the program. it continues playing... if you need the full code tell me i can...
[no replies]
predictable random numbers
 
i am trying to find a formula or a made generator for random numbers, i tried seeding srand with time(NULL) but when i use rand()%1 to randomly choose 1 or 0, 0...
[5 replies] Last: My first post, so here goes! I'd be curious to know what extra code y... (by hereComeTheFuzz)
Issue with bracket balancing and checking to make sure string is only in letters
 
Hello! I am working on an assignment where I need to validate the string input for car colors are letters only. I was able to get my car numbers to only be inte...
[5 replies] Last: Normally you would create it like this: bool input_valid = false; wh... (by Thomas1965)
Outputting and input with a class
 
I have this very simple class. I want the input and output to work with the string however for both I get an error. #include <iostream> #include <string> clas...
[2 replies] Last: Just think, how can you write to something 'const'? (by liuyang)
by FBHSIE
Insertion swap not swapping
 
I'm trying to pass an array into insertion sort to swap it, but I always get zero swaps when I run it. (This is not the same as my searching benchmark program)....
[6 replies] Last: Nope. Just made a mistake. I apologize. Didn't even notice it and it d... (by FBHSIE)
Hash Table Bug
 
I'm working on a hash table project using chaining to resolve collisions and I have a weird bug I can't figure out. Adding multiple items to one index works unl...
[1 reply] : Use a debugger. (by Cody0023)
by FBHSIE
Car program (1,2)
 
I'm getting this error. I think it has something to do with how I'm calling the member functions brake and accelerate. http://prntscr.com/bzvjho I have to des...
[25 replies] Last: I messaged you (by FBHSIE)
August 2016 Pages: 1... 202122
  Archived months: [jul2016] [sep2016]

This is an archived page. To post a new message, go to the current page.