Beginners - May 2020 (Page 16)

by Contim
Logical error
 
My question is whether anyone can tell me what the flaw is in my while () control structure loop tha...
[1 reply] : This: timeToCompleteThisDish = timeTakenSoFar + b; should be: ... (by dutch)
by jc3992
type int unexpected
 
Hello everyone, Just edited it as solved after I added: using namespace std; using std::vector; u...
[2 replies] Last: Initially I used int i2=0, i3=0, i5=0; but generated the same error. ... (by jc3992)
Do-While loop question
 
#include <iostream> int month; int main() { //month input do { std::cout << "Please enter t...
[3 replies] Last: Hello noblemin, You are welcome. Whether it is an if statement or a ... (by Handy Andy)
Hotel Room Calculator. Output is incorrect?
 
I made this program to calculate hotel expenses. Everything works fine, except the output is rounded...
[2 replies] Last: Ahh, of course. *face palm* Thanks man :) (by GamerAid)
Inheritance problem with code
 
I used to use Enemy class to make objects, but now i haven't made it abstract yet but i want to. My ...
[10 replies] Last: Thanks mbozzi, that's exactly what i was looking for. (by FJ39j39fs)
Need helping writing a code
 
Write your question here. Write a program that creates an integer variable and then assigns a ran...
[4 replies] Last: The problem is that the normal text (problem statement) is now harder ... (by andywestken)
Generating different random numbers
 
Q= How do I generate random numbers that are different from each other in the following code? s...
[10 replies] Last: I find this gsl::narrow, very useful. I actually found some bugs with ... (by thmm)
how fix missing template arguments before 'test'
 
i need use 3 class , + operator, vector and template but i get error #include <iostream> #inclu...
[1 reply] : Line 112: out_u test; You need to provide template arguments for th... (by malibor)
by mnnsa
pattern printing
 
how to print this type of pattern in this example n is given 5 and the pattern forms with 1's an...
[1 reply] : #include <iostream> #include <vector> #include <string> using namespa... (by lastchance)
by sparki
Class template cannot be constructed
 
Why do I get a compilation message error ''SeeAndSay::AnimalWrapper': class template cannot be const...
[1 reply] : m_animals.push_back(new AnimalWrapper <T> (animal)); ... (by Repeater)
I need help with a program using selection sort
 
So, I figured I had my code working. However, when ran its not displaying the pitchers names from my...
[1 reply] : The gibberish probably comes from myFile.get(pitchers ,30); What val... (by thmm)
by roiboi
How to cout first value of dynamic variable ?
 
I coded some classes and overloaded << operator. When i cout a dynamic variable of my classes, it sh...
[2 replies] Last: Treating a pointer to a single instance as an array is a bad idea. The... (by jlb)
How can I pass vector a an argument; getting an error
 
Hello, I built a vector of string elements. Then I am trying to pass such vector as an argument on...
[2 replies] Last: Oops, sorry. Thank you very much! (by mrpear2020)
Access-violation reading location
 
So I have been trying to eradicate this error for a few hours now but I was unable to. I am making a...
[5 replies] Last: Please post the declaration of class Map. Ideally, please post a prog... (by dhayden)
by nixUe
string to cstring trouble
 
I am struggling with a project in which you read lines from a text file, put the said strings into c...
[1 reply] : If you must use C-strings, then use C-strings for everything. You're p... (by jlb)
Does anyone can help me with java?
 
I have to make a java program to find the shortest path between to points to avoid the landmine fiel...
[2 replies] Last: Yeah, I saw it that's why I have that name on my topic. Anyway, thanks... (by joe2011)
Basic Pointer/Address Question
 
Hello all, I just have a quick question about pointers/adresses. If I am being asked to print the va...
[7 replies] Last: Andywestken has already explained how you were wrong and corrected you... (by MikeyBoy)
Trouble Setting up a Function and Some Fluff
 
Good day, fellow Quanrantinos! You may remember me from my current project of making a fast charact...
[9 replies] Last: Alright, then would that replace my else lines below the first if It... (by MikeyBoy)
Why do I have errors about variables that I pass to a function to compute the multiplication of 2 matrices?
 
Hello, I am trying to calculate the multiplication of 2 matrices. I have firstly dynamically cre...
[4 replies] Last: Hi, Following your feedback, I went back to the old code and did thi... (by Shishykish)
Windows Dumping Stack Trace
 
I dont know how, but this simple code produce a stack trace error.. exactly when i add the arrowed l...
[3 replies] Last: it works fine on my cygwin with -Wall -Wextra -std=c++17 -pedantic-er... (by jonnin)
May 2020 Pages: 1... 14151617
  Archived months: [apr2020] [jun2020]

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