General C++ Programming - April 2020

Writing in an area code from a number in a sequential file.
 
I am writing a code that reads from a sequential file. It recieves the name, state and phone number...
[2 replies] Last: Hey, jlb , the OP’s question isn’t perfectly-formed English, but ... (by Duthomhas)
Fibonacci Sequence
 
I recently got a hw assignment to create a program that calculates Fibonacci Sequence using a functi...
[8 replies] Last: Never mind I figured it out. Thanks for all the help! (by YoungProg19)
Compilation Error in using async with templates
 
I am trying to create a new thread with a recursive function call to the function itself:     std...
[1 reply] : This compiles and runs. I'm not sure it's entirely correct, though. No... (by dutch)
I need help with this program--creating classes
 
Create a class called Robot (living in a 2-dimensional city of streets and avenues) with the followi...
[4 replies] Last: Does it follow that if you go far enough South-East there's just a rea... (by helios)
Loop for fraction matrix
 
Hey. How do I build a matrix by rows and columns, and the values must consist of fractions (asks for...
[1 reply] : Duplicate post: http://www.cplusplus.com/forum/beginner/270036/ (by Furry Guy)
errors
 
I have this question in one of my assignments but I am not sure how to do it. ostream& operator<<...
[2 replies] Last: You have to cook up the answer, as c++ is not aware of significant dig... (by jonnin)
Out of bounds
 
For this question in an assignment I have float vec::operator (const int i) const { return...
[3 replies] Last: float vec::operator (const unsigned int i) const //unsigned, unless yo... (by jonnin)
Print out each element from a node in binary tree by using format of output
 
I have a question about a node in a binary tree. I saw some tutorials about this topic on the Intern...
[3 replies] Last: 1. Why not just make general, sound and disp contained members of Set... (by doug4)
Can anyone have a look see what might be wrong with my code?
 
My goal is to do a program to predict credit rating using a decision tree. My program should compi...
[3 replies] Last: Yes. actually refer to files (named train0x, test0x) that contain t... (by Leen0093)
by cdl99
Program reports number of characters to make shape
 
Hello, first time here. I have a program that creates a half pyramid shape using the "*" symbol. The...
[9 replies] Last: Ah yes, you're correct! I got the OP question wrong xD (by malibor)
Character choosing
 
I am having a problem with implementing the choosing of the character with the rest of my code. Inst...
[4 replies] Last: C++ is not Java. In general, don't explicitly call destructors. In g... (by mbozzi)
malloc(): corrupted top size. Aborted (core dumped)
 
I am simply opening a file inside a function. I really have no idea what could cause such a problem ...
[6 replies] Last: dutch ->Worked like a charm! Also very good suggestions, I will take t... (by urundead)
log N time complexity of a graph
 
( Graph / Union find) Hi guys, I'm studying a course on algorithms, the proposition is prove that...
[19 replies] Last: I think N is the size the of the tree. the problem is that they're ... (by dhayden)
"Shortcut" a command
 
I have something like this: class RGBMatrix{ int Matrix ; //STUFF } I want to be able, if...
[3 replies] Last: Thank you for the quick replays! (by urundead)
Void function reset
 
Is there a way to set up a reset code using void to jump back up in place after a certain line of co...
[3 replies] Last: "continue" (by TheToaster)
Derived class member function not being called (1,2)
 
So I posted a very similar question previously about this, but a fix that worked at the time has not...
[24 replies] Last: Oh man thank you so much!! I never would have got this otherwise (by zakinithos)
How to display two decimals places in the final result?
 
How do I make the final result display two decimal places? (since I am working with money.) and if ...
[1 reply] : Don't double post: http://cplusplus.com/forum/general/269977/ And don... (by Ganado)
HELP!
 
so I was given an input file where they gave me the following information #ofentries fruitname:col...
[1 reply] : https://www.cplusplus.com/reference/istream/istream/getline/ to read e... (by salem c)
how to force derived class to implement virtual functions of another class
 
class A { Public: virtual void A1() = 0; virtual void A2() = 0; } class B { public: ...
[3 replies] Last: Thanks for the help (by Scarletpimp)
Decrease int value in member function
 
I am trying to build a dungeon crawler type game. I have figured out movement, and damage from attac...
[10 replies] Last: @Ganado, it was the Buddha who spoke first about the middle way. (by Learner2)
April 2020 Pages: 123... 10
  Archived months: [mar2020] [may2020]

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