General C++ Programming - March 2014 (Page 27)

The history teacher at your school needs help in grading a True/False test.
 
The students’ IDs and test answers are stored in a file. The first entry in the file contains a...
[3 replies] Last: Not sure what else you are doing. The code compiles fine (with a few w... (by Smac89)
by MrMoe
Base class pointer and polymorphism
 
Hi, I'm trying to implement an evolutionary algorithm for an optimization problem and I need some ad...
[4 replies] Last: Thanks again for your comments. To be honest, I've never heard of visi... (by MrMoe)
Recursive adding elements in array
 
The goal of this program is to take 4 neighboring elements in an array and add them together. The pr...
[3 replies] Last: YPu clearly changed it wrong, because it should compile. And post your... (by MiiNiPaa)
Using singleton in c++
 
I created following classes in my program. Way.h class Way { private: std::string id; ...
[1 reply] : Way::Way(const Way& orig) { } void SetOnGoingWay(Way onGoingWay) //i... (by ne555)
by Dare
Someone pls help
 
//To practice writing programs using loops.Write a program that will allow the user to buy noteboo...
[1 reply] : So? What the problem is? (by MiiNiPaa)
by niuxe
The gussing game
 
Hi, I've just started c++, and I've tried to code the guissing game, but I ran into some truble when...
[no replies]
How to round to the nearest odd? C++
 
I want to make any decimal point in even to go to odd and any decimal point in odd stay as odd in C+...
[2 replies] Last: Using <cmath>... //Pseudocode If(floor(x) / 2 != 0) //If the number... (by Mats)
C++ Class Assignment, Need Assistance ASAP
 
Ok, so my assignment is to write a program that computes how many feet an object falls in 1 second, ...
[1 reply] : 1) Please use code tags when posting code, to make it readable: http... (by MikeyBoy)
by quayda
Sentinel not working....
 
I'm not sure why this isn't working, but this is my error message: Error] no match for 'operator!=...
[2 replies] Last: Yeah, that was the problem I was able to fix that, but now I'm struggl... (by quayda)
Matrix Multiplication
 
Hello, I have a program matrix multiplication but it work not for big arrays. I dont understood ...
[6 replies] Last: how can ı write as a matrix : double* x = new double[n*n]; for (int... (by candidate)
game timer suggestions
 
I am making a maze type of game and I was wondering, how would I create a background timer that keep...
[2 replies] Last: > code example would be a big help. #include <iostream> #include <fu... (by JLBorges)
Tic-Tac-Toe
 
Hello, I've been working on an AI program that has two AIs going against each other in tic-tac-toe. ...
[1 reply] : AIPlayer.hpp #ifndef AIPLAYER_HPP_INCLUDED #define AIPLAYER_HPP_INCL... (by crimsonzero2)
How to make random letters with a vector
 
Hi, everyone. Thanks in advance for helping. I have read the related topics to mine, but none of t...
[2 replies] Last: #include <iostream> #include <vector> #include <string> #include <alg... (by JLBorges)
DFS
 
Hai i am new to the world of competetive programming...I have just started to learn data structures....
[no replies]
use of double or float in array
 
Can you use data type double or float for an array? ie double n ; or float a; float m ; ...
[4 replies] Last: You can have an array of any data type. The offset must be a signed or... (by giblit)
Rounding to nearest half?
 
******EXTREMELY NEW TO C++***** C++ Question: How do I round to the nearest half integer? ...
[4 replies] Last: #include <iostream> #include <cmath> int main() { double a = {... (by JLBorges)
Static member/function errors.
 
What am I doing wrong with static members and methods here? compiler errors: 1>test.obj : error ...
[4 replies] Last: Thanks, L B and long double main (I obviously just missed your reply b... (by trainbike)
by kok23
ASSISTANCE NEEDED: Incremental Program Development, Vectors/Arrays, Loops, Output formatting
 
**I have a project that, unfortunately, the professor has not taught the class how to do. We use Dev...
[no replies]
If function is false, the else works. If true, segfault.
 
I have this function: bool login(const string& username, const string& password) { ...
[6 replies] Last: Haha, I got a broken gdb or anything like that. I'll test your code. (by iQChange)
fstream and replace question
 
Hello, I'm supposed to be able to replace a word within an input file (and in this case my input fil...
[1 reply] : ¿do you know what else means? look at how the lines were replaced ... (by ne555)
March 2014 Pages: 1... 2526272829... 36
  Archived months: [feb2014] [apr2014]

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