
please wait
by Rishard
Reading form a text file
|
How to read values from a text file and store values into a string based on plan from the example below when there are two plans PP and PR. Thus if PP stores th... |
Mar 16, 2019 at 4:29am
[no replies]
|
by sturk
C++ create constructor that takes 2 arg
|
Hi, I need help with creating a constructor that takes in 2 arguments in <class Line>. I have tried to do it. But it shows a compilation error. I'm not sure abo... |
Mar 16, 2019 at 4:14am
[3 replies] Last: I don't know what your assignment specifies; but inheriting line from... (by JLBorges)
|
by Ganado
Term for end of the function signature
|
I'm wondering what this thingy that gets attached onto the end of the function signature is called. struct S { void do_thing() const { // ^... |
Mar 16, 2019 at 2:12am
[4 replies] Last: Interesting, never heard the terms before. Thanks all. (by Ganado)
|
by maine1280
function within switch statement skipping over all cin imputs?
|
Hello, I'm trying to create a program where the menu uses a switch statement and each case has an associated function. The switch statement works correctly, ... |
Mar 16, 2019 at 12:42am
[5 replies] Last: Ok, I think I have it now. For case B: case 'b': case 'B'... (by maine1280)
|
by connar
Reading a file with mixed data types on each row
|
So I've been working on some code that will read the data off a file, which looks like: 2 apple 1 house 0 3 0 1 shed 0 4 0 3 car ... |
Mar 15, 2019 at 8:23pm
[15 replies] Last: That is a simple specialization then. I would store the pieces as a ... (by Duthomhas)
|
by huwha12
finding the square root with while loop
|
this is the code and it works but I was just wondering if someone can explain how it actually works? I understand that the d is used to output the number to the... |
Mar 15, 2019 at 7:59pm
[17 replies] Last: ... if you have a non-iterative solution ... A non-iterative soluti... (by MikeStgt)
|
User Defined Dynamic Array |
Hey guys, I am trying to create a user-defined dynamic array like the one in this video (https://www.youtube.com/watch?v=jxpa7QEGojw) I am having a problem co... |
Mar 15, 2019 at 7:40pm
[5 replies] Last: It worked!! Thank you guys so much I'm just really curious to know ho... (by Jack Van Stone)
|
by DrSocha
Average and minimum value from Array
|
I'm trying to calculate the average and a minimum value from an array after I create random numbers. I tried a lot of different methods and nothing works. I don... |
Mar 15, 2019 at 5:53pm
[4 replies] Last: I get no errors while running in Eclipse. Will check, thank you. (by DrSocha)
|
by ChimpCoder
Make a Reset() Function
|
I just finished making a hangman game and I can't figure out how to make a reset function #include <iostream> #include <string> #include <vector> #incl... |
Mar 15, 2019 at 4:56pm
[4 replies] Last: Hello ChimpCoder, I am not sure what I was thinking at the time, but ... (by Handy Andy)
|
by lastchance
Sum of vector using iterators
|
Make sure that sum is initialised. If you compile it in cpp.sh it tells you that. int sum = 0; |
Mar 15, 2019 at 4:30pm
[5 replies] Last: you can do it with a loop. You should not, but you can if you want to... (by jonnin)
|
by sturk
C++ class inheritance shapes
|
How do I use my class shape as shown below? Class shape is one that consist of the draw method. But how do I show the inheritance from Class shape to class poly... |
Mar 15, 2019 at 4:27pm
[5 replies] Last: For simple school exercises, you could probably get away with Point p... (by salem c)
|
by AL88
Why is option 1 segfaulting?
|
Why is option 1 segfaulting? Thanks. #include<iostream> #include<algorithm> #include<vector> #include<string> #include<fstream> #include<iomanip> ... |
Mar 15, 2019 at 4:09pm
[2 replies] Last: I would start by properly indenting your code, fixing all the compile ... (by jlb)
|
by fmaneiras
Programming in natural language
|
Would it be possible to create a programming language from the C ++ code comments? I think of a web page with code search, in which the user searches in natural... |
Mar 15, 2019 at 3:49pm
[2 replies] Last: it is intractable to process human to executable. Programming languag... (by jonnin)
|
by calioranged
unordered_map - Seemingly Random Control Jumps
|
*** Not intended for practical use, just trying to understand why this issue occurs *** There are seemingly random control jumps in this program. After the l... |
Mar 15, 2019 at 2:54pm
[2 replies] Last: Thanks for that salem c (by calioranged)
|
by sturk
C++ compilation issue
|
Hi I am trying to figure out why am I getting some compilation issue with my codes as below? After I tried incorporating class polygon into my line class it gav... |
Mar 15, 2019 at 12:45pm
[4 replies] Last: class Line : public Polygon { private: Polygon p1; Polygon p2; ... (by keskiverto)
|
by mxracer321
Removing Leading and Trailing whitespace
|
I am working on project and i am almost finished but the last part of the assignment is to take the user input and remove all leading and trailing white space,... |
Mar 15, 2019 at 1:14am
[5 replies] Last: So i understand what you are saying to do but im not exactly sure how ... (by mxracer321)
|
by AL88
Why doesn't the spare vector copy into the existing vector?
|
Why doesn't the spare vector copy into the existing vector on line 234? #include<iostream> #include<algorithm> #include<vector> #include<string> #includ... |
Mar 14, 2019 at 10:52pm
[6 replies] Last: I misread the parameter, I screwed up. I focused on the position+1. ... (by closed account E0p9LyTq)
|
by Vetzo
std::vector - mess up its memory management
|
Hello Forum, If I have a std::vector object, and I have 2 pointers to it, and I use both pointers to modify the std:vector object, can I mess up its memory m... |
Mar 14, 2019 at 9:13pm
[3 replies] Last: Ok, good. I didn't plan on doing anything strange. Thanks for the res... (by Vetzo)
|
by AL88
Why doesn't the erase element function work?
|
I'm trying to write a program to manipulate a vector and save it in a text file. All the functions work except the erase element function, lines 371-377. Why is... |
Mar 14, 2019 at 8:51pm
[3 replies] Last: Why isn't people.erase(position); working? Because you are supplying... (by closed account E0p9LyTq)
|
by BIGB185
Inches to centimeters loop
|
So I'm supposed to write a program that prompts a user for a two numbers within 36 inches of each other. Use a for loop as a timer. An outer Do While Loop ... |
Mar 14, 2019 at 7:56pm
[10 replies] Last: Thank you, JLBorges. (by BIGB185)
|