Beginners - October 2019 (Page 11)

by Horror
Struggling with the last two functions
 
I'm struggling with the last two functions of this program. I'm unsure of what to do for these last two functions. #include<iostream> #include <fstream> us...
[4 replies] Last: Your attempt at reading the file is broken in many ways. 1. eof doesn... (by salem c)
My Collision detection stopps working
 
Hi i wrote really basic collision detection .Called (Pixel Perfect Collision Detection)but when i go backwards in game collision detection stops working. Why th...
[16 replies] Last: Yes, if something is tile based, then I would suggest comparing intege... (by Ganado)
Deleted
 
[2 replies] Last: I'm trying to get the code to work regardless of how many rows or col... (by Enoizat)
I can't even solve this answer yet
 
main.cpp:63:29: error: request for member ‘setDeck’ in ‘deck’, which is of non-class type ‘main(int, const char**)::cardDeckType’ ...
[3 replies] Last: error: request for member ‘setDeck’ in ‘deck’, which is of no... (by keskiverto)
by Bopaki
My linkedListPRogram does not delete the node
 
The program compiles and runs fine but I cannot delete any node. Here is the header file: template<class Type> struct nodeType { Type info; ...
[9 replies] Last: Thank you all!!! Problem sorted out (by Bopaki)
C++ . for loop and do-while
 
hi. I have written this code for my homework in FOR loop. The programs runs but i just want to make sure i used it correctly. Any suggestions? i also need to wr...
[2 replies] Last: @lastchance Thank you so much for your help. (by novice2019)
Algorithm for sorting names
 
Hey guys, I am trying to figure out how to write this algorithm for a program we are doing. We have to read in names and phone numbers as strings and then store...
[3 replies] Last: I almost have the program done. Its due by tomorrow night. My last thi... (by XboxOne2019)
Access a variable after an if else condition
 
Hi, How do I access a variable after it has been updated in an if else condition. From searching, it seems as if it is a scoping issue but I thought that declar...
[8 replies] Last: The minute you enter a different scope, you can no longer see the y in... (by highwayman)
Is system just a pass through to sh?
 
Nothing else much to say... is it a pass through? system("echo hello world");
[2 replies] Last: Yayyyy thanks (by highwayman)
Finally trying to learn vectors
 
Hi, so, first, I'm making my own vector class instead of using the library. This is homework. I'm not necessarily asking for code. I have written some code, I j...
[14 replies] Last: Alright, I can wrap my head around that. A dynamic object's life has t... (by jjordan33)
Comparing rationals with overloaded operator
 
Hey I've been trying to compare two rationals and see which one is bigger, but I can't figure out why it's not working. When I put in two rationals like 6/7 and...
[9 replies] Last: @Deadweight77, try bool operator >(Rational r) { return nu... (by lastchance)
Help in a tree question
 
Chef has a rooted tree with N vertices (numbered 1 through N); vertex 1 is the root of the tree. Initially, there are some bacteria in its vertices. Let's denot...
[10 replies] Last: Hmm. I think as you go up the tree, and backward in time, if you're lo... (by dhayden)
infix expression evaluation without stack library
 
How would I do this code without including stack library?What changes I have to bring then? Can anyone kindly do it? Thanks! #include<iostream> #include<...
[1 reply] : You are attempting to reimplement the wheel by avoiding standard heade... (by malibor)
Help with handeling dual vectors
 
I am trying a to make a program which returns a corresponding int value to a specific string value. a program where you first enter a set of name-and-value pair...
[2 replies] Last: The program is not taking input from cin>>input_name; ??? Don’t wr... (by Enoizat)
Infix to post fix code
 
The last else will not run if the first if condition has worked. So how will we check the priority? Also, I couldn't understand the last two else conditions in...
[no replies]
My string handling program keeps crashing in its second loop run.
 
Okay, so I'm supposed to write this program for school that takes a commercial number in letters, Like HOME CALL and convert it to its numerical form: 466-325...
[3 replies] Last: Thank you both for the responses. Getline(cin>>was,a) worked like a ... (by XavierX)
I m getting lost in here...
 
Declaring a C++ object is the same. Use the object name as the data type. cardDeckType deck; //cardDeckType is the data type, deck is the variable. ...
[3 replies] Last: Example of what? Just uncomment the line that would include cardDeckTy... (by lastchance)
Need help making input validation work
 
Hi, I was wondering if anyone could help me out in making any number greater than 20 and less than 3 give an error message that redirects the user to inputting ...
[14 replies] Last: #include <iostream> #include <cstdlib> #include <string> bool parse_... (by mbozzi)
Stacked linked list, head is NULL pointer error w/ parenthesis
 
I am trying to code a calculator class that uses stacks to calculate a string. I have to implement the stack myself and I did so by using linked lists. Everythi...
[1 reply] : Edit: Pretty sure this is actually wrong, ignore. When you pop it t... (by highwayman)
by iiAlex
Program returns after I prompt the user for vehicle type, why?
 
Program returns after I prompt the user for vehicle type, why? #include <iostream> using namespace std; int main() { int miles; int vehicle; ...
[5 replies] Last: Hello iiAlex, The first time I tried this with an if statement (vehi... (by Handy Andy)
October 2019 Pages: 1... 910111213... 18
  Archived months: [sep2019] [nov2019]

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