
please wait
by keskiverto
Can you create an instance of a class using a variable?
|
Duplicate of http://www.cplusplus.com/forum/general/283588/ |
May 16, 2022 at 9:38pm
[no replies]
|
by bydrachen
Creating Class Objects and Pushing Back to a Vector
|
Here I wrote some wrong code to tell my problem. I want to create a class object and at the same time, I want it to be pushed back into the vector. As a beginne... |
May 16, 2022 at 6:00pm
[4 replies] Last: For JLBorges, thanks for your kind suggestions. I still don't know abo... (by bydrachen)
|
by jaffe15
Is it normal that smart pointers can't solve a problem?
|
Hi! I was wondering how normal it is that a problem can't be solved with smart pointers? On my current project I can't seem to use smart pointers (which I am a... |
May 16, 2022 at 1:50pm
[4 replies] Last: A better question might be: "Is it normal that pointers can't solve a ... (by deleted account xyzzy)
|
by bydrachen
A beginner's class and assignment. May a little bit help?
|
Hi! Currently, I'm learning C++ classes and object oriented programming. It's hard for me to learn because this is my first language. I have an assignment and I... |
May 15, 2022 at 9:44pm
[3 replies] Last: Thanks for your kind suggestions jonnin and seeplus. I tried to apply ... (by bydrachen)
|
Writing a function |
Write a function, computePrice that receives two parameters: the first one is a character variable indicating the size of the pizza (S, M or L) and the second a... |
May 15, 2022 at 11:18am
[2 replies] Last: thanks , So I was kinda on the right track at the beginning (by blackpanther35)
|
NumDays Class |
Essentially I was creating a class called NumDays where I convert the number of hours into a day since the problem stated there are 8 hours in a day. So I ... |
May 15, 2022 at 9:01am
[4 replies] Last: The pre-inc/dec operators are still not as expected by convention. pre... (by seeplus)
|
by BigNibs
issue with a loop and maybe sentinel?
|
My instructions were to make the program run until a sentinel was entered, in this case my sentinel was any negative number, however I want the program to imdei... |
May 15, 2022 at 8:53am
[11 replies] Last: It's easier if you make input as a function: #include <iostream> i... (by seeplus)
|
by kingsy
Newbie - Tips needed
|
Hi, I am new here. Just started learning C++ out of interest. All helpful tips to succeed in this journey will be highly appreciated. Best. |
May 14, 2022 at 10:53am
[4 replies] Last: Thank you seeplus. That was really insightfuil. (by kingsy)
|
by satsat111
Find the right root
|
Hello everyone, may I ask that given size, nodes and edges of a tree. How can I find the correct node to be the root so that the maximal number of nodes in subt... |
May 14, 2022 at 6:37am
[14 replies] Last: Greetings, thank you for your help, solved now. (by satsat111)
|
by plastic
Segmentation fault in code
|
Good morning. I'm new to programming and need some help. I'm getting segmentation fault in the if statement with the following code. void delete_car(car_da... |
May 14, 2022 at 12:04am
[14 replies] Last: keskiverto thank you for your help, but the code is now fixed. I corre... (by plastic)
|
by dsimp21
C++ Oscillator not confirming finding sound source or emitting wave
|
I'm trying to follow along in a tutorial of how to code to an oscillator on youtube. Idk if I can link the video without breaking rules here. I am using codel... |
May 13, 2022 at 5:00pm
[3 replies] Last: A meta-search link might be helpful to find easier to use ideas. http... (by deleted account xyzzy)
|
by agirideep
Outputting each instance value.
|
Hello I have a problem outputting each value for the getIndvCost() function and I wanted to see if anyone knew how to output them using pointers. //John... |
May 13, 2022 at 1:10pm
[6 replies] Last: There is more than two valid syntaxes, are there? (* ptr ). addPrice... (by keskiverto)
|
Calculate Average |
Complete the CalcAverage() function that has an integer vector parameter and returns the average value of the elements in the vector as a double. Ex: If the ... |
May 13, 2022 at 10:50am
[9 replies] Last: I think it depends how many numbers you have and how big those can get... (by kigar64551)
|
by satsat111
Weighted graph
|
Hello everyone, I got problem putting the weights of each child's and getting the max weighted child among them in the code. Some said that this should be solve... |
May 13, 2022 at 9:05am
[4 replies] Last: Hello, actually I discussed with my friend and a friend of mine gave m... (by satsat111)
|
by utredgodless
Displaying data from file
|
So i have a dat. file that holds 500+ user data information. I want to be able to sort the data into arrays and display it if the user selects that option. ... |
May 13, 2022 at 3:49am
[12 replies] Last: And, in that vein, here is a solution looking for a problem using tupl... (by againtry)
|
How do I loop this? |
I have to use a function getData aswell as displayOutput and make a for loop so so that it can loop 5 times. Heres What I got so far #include <iostream... |
May 12, 2022 at 11:48am
[9 replies] Last: Notice the detail: if (volume < 100) { std::cout << "Size: small\n... (by keskiverto)
|
by CodeChaser
list<T> within a template ?
|
#include <iostream> #include <list> using namespace std; template <typename T> void DisplayContents(const T& inList) { //list<T>::const_iterator ele... |
May 12, 2022 at 10:19am
[6 replies] Last: > I know what the rest does, but still trying to figure out what.... >... (by JLBorges)
|
by Anonomys
Find Lowest and Deduct
|
Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. For example: if the user enters the value... |
May 12, 2022 at 9:33am
[3 replies] Last: I have corrected it , it works now! (by Anonomys)
|
by jNc
OpenCV related, get item from vector of cv:Point
|
Write your question here. string path = "man.png"; Mat img = imread(path); Mat matrix, imgWarp2; std::vector<std::vector<cv::Point> > conto... |
May 12, 2022 at 9:04am
[3 replies] Last: solved, thank you (by jNc)
|
by Pen72
Euler order
|
Good morning, I'm trying to write a program to print the Euler Tour order on a tree. But the code isn't successful, is there any problem regarding the way I inp... |
May 12, 2022 at 4:09am
[12 replies] Last: Hello, thanks a lot for the great help!Passed all cases now. (by Pen72)
|