Beginners - October 2018 (Page 9)

Desperate need of help
 
So I really need help in cpp. I've been taking this course for a few weeks but I am still very confused and havent quite got the hang of it. I need a step by st...
[5 replies] Last: One thing: <string.h> is not used for the std::string datatype. st... (by Ganado)
How to sort an AA Tree?
 
For my AATree Insert function and Treesort when I print it inorder it doesn't print it sorted, n {cout << arr << " "; } }
[1 reply] : Is buildBST supposed to be insert ? If not, where is the code? Al... (by kbw)
solved
 
Hello everyone. I have a homework assignment that asks to input a string of up to 132 characters in length. I am asked to pass the input into an array and then ...
[5 replies] Last: With your CountLetters function, can you see how it would be better ... (by TheIdeasMan)
by Mr Mr
procedural C++ GUI apps ??
 
The book I'm reading right now emphasizes the procedural side of C++ in the first 9 chapters — the rest of the book after that (chap. 10+) emphasizes the OOP ...
[2 replies] Last: Qt and many of the other GUI frameworks are OOP, that paradigm seems t... (by TheIdeasMan)
Call to implicitly-deleted copy constructor...
 
I think that i'm missing something. Compiler returns me this error: Call to implicitly deleted copy constructor of 'std::__1::unique_ptr<Account, std::__1::def...
[12 replies] Last: @ vittorioc98 My apologies, I was discombobulated (wrong / confused... (by TheIdeasMan)
Need help with incorrect outputs
 
Hello, I have the program that I am trying to write in the comments directly below. My issue is when the program runs, I am getting answers completely incorre...
[1 reply] : Why not just have your meal in its actual value instead of doing this ... (by Ganado)
by ashwyn
Need help w/type conversion. (string to int)
 
I have this assignment for school and part of it involves this function below. The function is supposed to convert a string to an int. (We can't use built in...
[7 replies] Last: @lastchance You've been extremely helpful. Thank you very much for yo... (by ashwyn)
Segmentation fault in the very last for loop
 
I have a file that I am supposed to retrieve names from and make a list of it. There is something wrong with the candidates vector because when I try to call it...
[5 replies] Last: 16 candidates ... but on line 60 you try to print the 0, 1, 2 ... 16 ... (by lastchance)
by Satan
Factorial resolving more efficiiently (1,2)
 
Okay so we know that Arithmetic operations such as addition and subtraction are a set of rules built by humans to interpret how a given set of operands are hand...
[22 replies] Last: There is a formula that directly computes approximate factorials to v... (by mbozzi)
visual studio error contsant
 
How to solve this error # include <iostream> using namespace std; int main() { int n=20; int arr ; //error n must be constant return ...
[2 replies] Last: Hello zain ahmad. As TheIdeasMan said a vector would be a better choi... (by Handy Andy)
Using if statement to check whether string has value or not (homework)
 
Here is the actual question, "Write a program for a bottle vending machine in which you have to insert amount in the machine (take amount as an input from the ...
[4 replies] Last: Hello Hassan Ashas, After working with the program I came up with thi... (by Handy Andy)
Program not giving proper mathematical answer.
 
Here is the actual Question https://imgur.com/a/G6MrskV This is what I did. #include <iostream> #include <iomanip> using namespace std; int mai...
[7 replies] Last: what he said and what you're saying is literally the same thing but i... (by jlb)
comparing boolean in if statement
 
why wont this work? #include <iostream> using namespace std; int main(){ bool poop = false; if (poop=false){ cout << "fal...
[5 replies] Last: Consider : if (!poop) {} is the same as if (poop == false) {} ... (by TheIdeasMan)
Need help with Arrays and the Highest element of an Array.
 
Suppose you have a text file that looks like this, Alan Blandon 1, 2, 3, 4, 5 Marvin Alvarez 2, 3, 4, 5, 6 There is a 1D Array for names and a 2D Array for sc...
[3 replies] Last: The row with the highest score is the index of the names. For example:... (by Thomas1965)
by Blake7
My objects are sharing a variable?
 
I'm creating a little game where I have a player and the computer fighting each other. Although, for some reason, it seems like they're sharing the same hp. I'v...
[3 replies] Last: Well, think about it. Once you made my suggested change you started se... (by helios)
Borrow in C++
 
I am subtracting first number form second by using borrow it is giving right answer from 20th to 15th and wrong values from 15th to 0th plzzz help me # incl...
[1 reply] : #include <iostream> #include <string> #include <cctype> // true if e... (by JLBorges)
Keeping each input in a while loop instead of just the last one
 
The code you'll see is a palindrome checker. Every function works, and it will successfully compare a string to determine if it is one or not, and it outputs th...
[3 replies] Last: @Andy he said "Every function works perfectly". So maybe the headerfil... (by Satan)
Logic of this question (Homework)
 
Can someone tell me the basic logic of this program? I don't want the code, just this that what exactly is it I am supposed to do here? I can't seem to understa...
[7 replies] Last: Long double only starts to lose precision after 18 digits and that's a... (by Satan)
Need help with 2D Arrays!
 
Suppose you have a 2D Array that looks something like this, 1 2 3 4 5 2 3 4 5 6 3 4 5 6 7 How would you find the total of each row and display what the highes...
[3 replies] Last: An alternative without the need for a 1D array: #include <iostream> ... (by closed account E0p9LyTq)
by Satan
Review my permutations and combinations program
 
Hey guys do you see any possible improvements in this code? Any other suggestions are welcomed as well, I hope I'm not trailing any bad habits. For example I ha...
[13 replies] Last: Thanks a lot @TheIdeasMan that was helpful ;) Oh and thank you too @... (by Satan)
October 2018 Pages: 1... 7891011... 28
  Archived months: [sep2018] [nov2018]

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