Beginners - April 2016 (Page 24)

Confused about error message.
 
I'm writing a program that registers students into a class and does some other things but I'm having an issue with the function that gets the student ID. The er...
[3 replies] Last: #include <iostream> #include <string> bool checkStudentID( std::stri... (by JLBorges)
Need help with homework problems
 
Hi all, I joined these forums (in part) because I am stumped with a recent "homework" problem given to me by someone helping me learn C++. I would say I am c...
[2 replies] Last: Hi Try this for the factorial int factorial(int number) { if (nu... (by notrespond2u)
by wolfv
Polymorphic behavior for pointer types?
 
In the following example, Composite::print() works on an array of Base object pointers. Is there a way to make Composite::print() work on an array of Derived ob...
[4 replies] Last: Thanks etrusks. That's perfect; simple and safe for my application. (by wolfv)
Deleting data allocated in node
 
Hi, I'm trying to create unbalanced binary tree but after I'm done using it I'm having some real problems deleting the char* that was allocated using strdup C f...
[3 replies] Last: Ok so I found the error, 2 hours of my life is gone but its ok :D lin... (by etrusks)
by chops
Need to drive my linked list
 
I am in need of help with my main function. I need to drive three functions. Push, pop and print. What is the simpleset way to do so from main. I am trying to p...
[2 replies] Last: i understand. the above code builds but does not put out anything to t... (by chops)
Debugging problem
 
Please can someone help me with this problem? error1: expected class-name before '}' token } ^ error2: expected '{' before '}' token error3: expected...
[3 replies] Last: If you're learning alone then you'll gain much more understanding corr... (by MrHutch)
Greater than operator is wrong
 
Here is a MCVE of a ">" operator behavior I do not really understand, although I suspect it has something to do with number precision: #include <iostream> ...
[2 replies] Last: Thanks for the fast answer. (by solalito)
by Silviu
BST to AVL in O(n)
 
Hi guys! I hope this is the right place to post this question. I found in different places on the internet how to turn a Binary Search Tree into an AVL tree in ...
[no replies]
java percentage output
 
Can someone help me, understand why my output displays 5350% instead of 53.5% The Miles Per Gallons is : 5,350% gallons
[5 replies] Last: Did you divide the distance traveled (856 miles) by the gas usage ... (by Peter87)
interaction of size_type and substr()
 
I am trying to teach myself c++. I've been to the C++ definitions but I'm not very good at understanding the definitions. My code works and I think I can do ...
[3 replies] Last: > for some reason "quoted" gave me errors though std::quoted came w... (by JLBorges)
can someone please tell me how functions work??
 
i am teaching myself c++ and i thought that when i pass an argument to a function it supposed to use it. but his one says "salary was not declared in this scope...
[1 reply] : nvm ignore me, i figured it out (by HotaLIsa)
Marking a space on a Minesweeper grid
 
This is a HW question but I do have most of the code created just hungup on one detail. For the "Mark Space" program I am having the issue of not being able to ...
[4 replies] Last: Thank you! such a silly mistake hahah I appreciate the help!! Its all ... (by dgood42)
help regarding sorting strings
 
i am trying to read a file and sorting it alphabetically, i do not know how to tackle this issue. so i am reading a file that contains , States, counties, an...
[no replies]
error: expected constructor, destructor, or type conversion
 
I got this error message: error: expected constructor, destructor, or type conversion before ‘=’ token or something very similar for every line from 34-7...
[no replies]
need help with class constructor!
 
I am trying to test to see if one of my constructors is working. It reads in a string that looks like this, <title>|<year published>|<author>. The constructor s...
[no replies]
by kalrin
program help
 
hi guys i am unable to make my second function work... i know that i am doing something wrong with the whole string thing... some help would be much appreciated...
[no replies]
looking for help
 
write a program that contains the following menu and programs within menu: 1) my information 2) maximum number in three 3) convert meters to kilometers 4) ...
[1 reply] : This is not a homework site. Show your work, answer what problems do y... (by chicofeo)
by tnt980
Need help with tic tack toe cant get it to say player wins
 
// Constants for the rows and columns const int ROWS = 3; // Constant Size of Row is 3 const int COLS = 3; // Constant Size of Colmn is 3 // Function pr...
[no replies]
delete
 
delete
[no replies]
Logical error with counter
 
I have a logical error with my code but I cant find it and no matter what I change its like going around in circles. From the snippet I'm supposed to have a max...
[no replies]
April 2016 Pages: 1... 2223242526... 43
  Archived months: [mar2016] [may2016]

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