General C++ Programming - February 2017 (Page 10)

Virtual methods create problems, not compiling
 
Hello guys,i made a program which manages graphs and works fine for now. I'm extending the class "LIST" that is used inside my graph class. So i made virtual ...
[1 reply] : I KNOW IT'S SO BORING to read full code and trying to compile it but ... (by cire)
Programming Project Help
 
< sorry >
[6 replies] Last: Thanks for the help and advice everyone. Will delete original post in... (by StrikingSparrow)
Store numbers from a char array into single variable
 
Hey guys, was wondering if any one had a few moments to show me how to store some nummbers from a char array, into a single variable? I'm in a coding class now...
[1 reply] : cout << "Enter FIRST number's length: "; cin >> length; Wh... (by integralfx)
Reading Integers From A File
 
I'm having trouble getting integers from a file. If there is no space at the end of a file it works fine, but if there is a space after the last integer it grab...
[1 reply] : if (!(file >> fileArray )) //error reading or converting input ... (by helios)
Help with code
 
I am 90% done with the code I just can't seem to get the coding right for the output. The code needs to be showing the forested acres at the end of each year bu...
[1 reply] : put the print statement in here for (double i = 1; i<years + 1; ++i) ... (by jonnin)
Need help with outputting and deleting elements in an array for a War card game
 
Hi I was wondering if anyone could help me out with this problem I'm having with my program in terms of getting the card to be removed from the array as well as...
[no replies]
by tit0n
Trying to computer the closest pair
 
we are given double d = p .distance(p ); Im not sure how to make out this code. Can anyone explain? And how would I go about this?
[1 reply] : Do not doublepost. The other thread: http://www.cplusplus.com/forum/be... (by keskiverto)
Floating Point Exception Error
 
Hi I am having difficulty running my program it keeps giving me a floating point exception error. Can someone give me suggestions?? # include <iostream> using...
[1 reply] : The % modulus operator expects integer values, but in several cases th... (by wildblue)
C++ solution checking
 
Hi everyone! I need a help to have 2 and more solution for 3 problem. It would be wonderful if someone will help me. The problems are as foolows: Problem 1:...
[no replies]
by elsa
How to overload operators in existing code
 
Hello! I need to re-write this program to overload the following operators: ">>, <<, +, -, *, ==, !=, ++ (for square)" ...I have read about the basics of oper...
[6 replies] Last: > I'm using (VS 2010) Upgrade to a more current version of the compi... (by JLBorges)
Help
 
I am having trouble even understanding what I am supposed to be doing. Most the time I just copy code in class and then rework it but we weren't given that for ...
[1 reply] : Most the time I just copy code in class and then rework it Unfortuna... (by dhayden)
Question on my c++ project (loop)
 
I am almost done with my project, but this one minor thing is keep bothering me. I have to find the total value of winning chips. #include <iostream> #inc...
[2 replies] Last: rewardTotal = reward + rewardTotal; looks correct for the grand total.... (by jonnin)
Filling a 2D array
 
So my question is how does one fill a 2D array full of numbers. Not random numbers. In my particular case i'm trying to fill it with zeros static const unsig...
[6 replies] Last: make a function that checks it using a for loop.. (not sure if this is... (by Flaze07)
Assignment Operator
 
Hello !! I'm coding an ADT for set. template <typename elem> class Set { public: Set(); ~Set(); void add(const elem & e); ...
[3 replies] Last: oh, and union is a keyword. this might cause issues. (by jonnin)
Set (ADT)
 
Hello ! I'm coding the ADT for sets. I'm using a vector of strings as the main structure but i have a lot of trouble coding the union function. Does anybody hav...
[1 reply] : Details of std::set-union here:http://www.cplusplus.com/reference/algo... (by gunnerfunner)
Network several connections TCP server
 
Hello guys! When i connect with my client it works great and in the console for the server it pop up that I have joined. When I then try to join the server f...
[1 reply] : You should try posting to the SFML forums. http://en.sfml-dev.org/for... (by JayhawkZombie)
trouble with a C++ PROJECT
 
I really don't know how to implement this Spin the wheel function, it's supposed to send a player backwards or forwards a certain amount of spots // boardga...
[4 replies] Last: @Jonnin thanks that seems to have solved it (by nostalgiaultra)
Can't add a value to a value in eigen
 
I'm trying to get this to work: Board(row, col) += (1.0f / 6.0f); Board(row,col) is 0.17 and the answer should be 0.33, but instead it's 6.2.. Can som...
[1 reply] : what is board? if an array or type, perhaps you meant board or some... (by jonnin)
by elsa
Figuring out pseudocode and fixing methods for complex number program
 
The assignment is as follows: "Create a class for working with complex numbers. Only 2 private float data members are needed, the real part of the complex numb...
[4 replies] Last: Thank you for the help! It worked perfectly! You guys put S.O. to sham... (by elsa)
BNF definition of the syntax of (all possible) input statements in C++.
 
This is what I have so far: <Input Statement>::= <Dashes> <Expression>; <Dashes>::= >> <Expression>::= <Identifier>|<Identifier> <Dashes> <Expression> <I...
[1 reply] : What is an "input statement"? http://eel.is/c++draft/#gram http://w... (by mbozzi)
February 2017 Pages: 1... 89101112... 16
  Archived months: [jan2017] [mar2017]

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