General C++ Programming - May 2015 (Page 2)

-(BOOL) and +(BOOL)
 
what's the difference between these two?
[1 reply] : Before applying the unary + and - operators the bool value will be pro... (by Peter87)
Trig Calculator Help
 
Hello. I am new to programming and i would like some help. For my program i need to use functions to calculate the hypotenuse and four trigonometric values (sin...
[6 replies] Last: your decleration and implementation are different... you have 2 doubl... (by Gamer2015)
A fun guessing game
 
The directions are simple: Write a program that calculates a random number 1 through 100. The program will guess the number. If the computer guesses too high o...
[6 replies] Last: Oh I fixed it doug4 but thanks! I'll mark it has solved. (by TheDMinor)
Battleship Final Help
 
So my final is due today, it's to create a 2-player game of battleship, and everything was working perfectly except that it doesn't display the hits or misses o...
[8 replies] Last: Only two things I can see wrong with that is you have if(i==10) when... (by shadowmouse)
hash table chaining
 
Hi, i have a project where i should read an input.txt that contains a x node, the neighboor y and the weight w of the connecting line in the graph... so i shoul...
[9 replies] Last: Ok i will follow your advices, thank you very much, i really appreciat... (by chris896)
by babno
Reformatting a text file
 
I am getting large (several MB) spreadsheets in txt form with way more information than I need. It is predictable. So I want to load up my input file, put the f...
[1 reply] : put the first line into an array of chars Why the array of char, why... (by jlb)
Plz help ,, my exam tomorrow :(
 
i want a code for this plz :( Write a C ā€“ Program which : a) stores the students data in an " array " , ( stu ) b) data of each one of ...
[6 replies] Last: i'm afraid it's didn't work (by ahmadelwaly)
by blueee
HELP!!
 
The rainfall figures in mm are available for each day of the past four weeks. Write a function generateReport() that displays the total rainfall for each week ...
[14 replies] Last: you're welcome (by Gamer2015)
Loading numbers from .txt-file into integer variable
 
Hi guys How can I store 2 numbers in a .txt-file in two diffrent variables? The .txt-file Looks like this: 1024 520 00:0 00:0 00:0 00:0 00:0 00:0 00:0 00:0 00...
[3 replies] Last: How can I load the map which has the Format TileID:TypeID read an in... (by Gamer2015)
Help!!! I don't know why my program won't work.
 
#include <iostream> #include <cmath> #include <string> using namespace std; void getPoint (double&, double&, double&, double &); void calcDistance (dou...
[1 reply] : please use the code-tag ([code ] here comes your code [/code ]) you f... (by Gamer2015)
Array problem
 
How can I accept input of integers in one line?
[1 reply] : split them by ' ' 25 156 19643 1 std::cin >> i1 >> i2 >> i3 >> i4; ... (by Gamer2015)
How to initialize a vector of classes in a constructor?
 
If I have a class Player and I want a vector of Player inside a class Team, how can I initialize it in the constructor? -------------------------------------...
[3 replies] Last: Thank you both for the attention. Andy, I had tried to do the constru... (by valerio92)
looping through array of string elements
 
I am trying to compare the variable named response which contains a user's input, with an array of acceptable input strings named request001. When it finds an a...
[7 replies] Last: thanks for the help, but my code in my reply above yesterday, May 27, ... (by pmwright)
Working with txt file
 
I'm supposed to make a program in which I print the content of a txt file in the console. And I already have the algorithm to print out all of it properly. B...
[2 replies] Last: Thanks man! (by Osej Alhasad)
by hav206
tree traversal
 
this code does not work properly, please help It was able to print out only 2 levels template <typename T> int BST<T>::nonrecursive_level(const T& item) { ...
[5 replies] Last: When you push it in the queue, you have updated the temp (by hav206)
Animation
 
Iā€™m going to start from scratch, it should result in a simple 2D-Platform shooter.ļŠ The window is up and the sprite is displaying just fine. How do you guy...
[no replies]
Coin spending problem. Help improve the time complexity, please.
 
I'm only asking for a description (pseudocode) for a better method. allSuitablePayments (int price, const std::array<int,N>& coinsPossessed) is a function that...
[5 replies] Last: Here is my implementation of dhayden's method, using pure recursion wi... (by prestokeys)
by A991ES
College problem
 
Is anyone willing to help me solve (and explain) a few problems that I have for homework in C++? Thanks.
[18 replies] Last: char a , B , C , C ; This line may be the culprit, should it ... (by R23MJ)
Looping though a vector of abstract classes.
 
When i try to call a function from a pointer while looping trough a vector of pointers the program crashes("App.exe is not responding!"). declared in header: ...
[5 replies] Last: so you check the vector in an other scope? If that's true it makes sen... (by Gamer2015)
IVR Call flow State Machine :: Boost.Statechart
 
i'm trying to implement a state machine that can handle the flow of the calls inside an IVR using the Boost Statechart Library, but im very green on C++ and nee...
[no replies]
May 2015 Pages: 1234... 22
  Archived months: [apr2015] [jun2015]

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