General C++ Programming - August 2014 (Page 24)

Derived virtual class, returning object
 
Hi guys, I am having an issue I need some help with. If I have a virtual base class such as... class BaseItem{ public: virtual ~BaseItem(){} ...
[2 replies] Last: Thank kbw, works like a charm! (by toomanystars)
Error handling when using Boost NonCopyable
 
I have been using a Boost NonCopyable library in Microsoft Visual Studio 2013. What I have is the following error message: Error 1 error C2280: 'boost...
[4 replies] Last: //tell user about error. In this case you are the user (of noncopy... (by closed account 10X9216C)
class and variable declaration
 
#include<iostream> #include<conio.h> #include<string> using namespace std; class ir; class Bank_acc { private: string name,type,s; lo...
[1 reply] : #include<iostream> //#include<conio.h> #include<string> #include <cma... (by JLBorges)
by judo11
How to get the sum of rows and columns in 2 dimensional array?
 
Here's my code for adding the rows and columns. My problem is that my program displays an incorrect output. main() { int a ,r,c,y,x,sum=0,rn,cn,cs=0,rs=...
[6 replies] Last: @judo11 What keskiverto is trying to tell you, is you must reset the... (by whitenite1)
c++ and sqlite
 
Can someone please help me understand how to integrate this. I want to write a simple console program in c++. I want to simply create a db and read from it. I a...
[1 reply] : Most C code ia valid C++ too, so what's wrong with using C API exposed... (by modoran)
Operator>> no match error
 
#include<iostream> #include<conio.h> #include<string> using namespace std; class Bank_acc { private: char name,type; long int accno,tem...
[3 replies] Last: cout <<endl<< "Is the account a savings account or a current account?... (by KarnageKnight)
Counting black pixels in an image ??
 
I have a problem with the counting black pixels program at the very bottom and i dont know why its showing errors #include <QCoreApplication> #include <...
[no replies]
by jaystu
Reading file into 2D array
 
can someone help me read a text file and store the file contents into a 2D array? Here's the file: 100 101 102 103 104 105 106 107 108 ...
[1 reply] : As it's set up now, the nested loop is infinite. You should be testin... (by cire)
Game Programming Graphics
 
Hi =). I am looking to create a simple 8-bit top down game. Simple collision basics that I can learn as well as maybe some sort of inventory/equipment system, ...
[2 replies] Last: SDL - https://www.libsdl.org/ SFML - http://sfml-dev.org/ Opengl - htt... (by roger911)
Impossible to escape?
 
Ok so I have Project25 and Project26 below. Project25 endlessly checks to see if Project26 is open and if its not it starts Project26 and Project26 does the sam...
[4 replies] Last: MS is aware of the Robin Hood / Friar Tuck problem, so I doubt it. (... (by Duthomhas)
using a header file across multiple files
 
So say I create a header file which contains a list of structs, and I want to use these structs through out my source and some of my classes... how would I acco...
[2 replies] Last: Nevermind... The problem was in the header file... forgot to close the... (by roger911)
by iebwen
how to stop strings separating: cin
 
I'm currently learning c++ from programming books. Codeblocks is the IDE I am using. One of the exercises asks me to compare two string sizes inputted by the us...
[5 replies] Last: getline worked perfectly. Thanks for the help. Really appreciate it si... (by iebwen)
Draw two overlapping circles in C++
 
Here is my code. I need help Drawing two overlapping circles both with black borders but different colors shaded inside. My current code contains two circles th...
[no replies]
conversion using constructor &&&& cast () operator overloading
 
---------Project for converting by constructor method--------- //main.cpp #include <iostream> using namespace std; #include "truck.h" #include "ca...
[2 replies] Last: ummm.... and what is C++ cast syntax the one I used is just class::o... (by danicpp)
Result of !(NOT) on integer value stored in an integer?
 
Can I replace the following: VGA->precalcs.characterwidth = VGA->registers->SequencerRegisters.REGISTERS.CLOCKINGMODEREGISTER.DotMode8?8:9; With: byte ch...
[3 replies] Last: That's right. The ! operator is a logical operator, so its result will... (by Duthomhas)
How to read in comma separated table.txt
 
Hello everyone! I am currently reading in a table separated by spaces which looks like this: Pol1 M N 20 100000 1 .04 99 Pol2 F S 30 100000 1 .05 99 Pol3 M ...
[1 reply] : Change that to: string line; while (getline (datafile, l... (by AbstractionAnon)
by q139
Fast way to read content
 
Hello, I am trying to make graph program that reads file and creates graph. How could code read a long text file and store it ram so it could be accessed quick...
[8 replies] Last: Thanks alot, maps is very useful, now all lines can be mapped by numbe... (by q139)
Getline as the conditional of a While loop
 
I am trying to use getline as the conditional for a while loop as seen below. string filename, guard_name; int call_number; vector <Seniority> S...
[3 replies] Last: Thanks for the help naraku, that is a good solution! (by ALtherak)
Help with making a music player.
 
Hi, i was wondering if anyone knows a good tutorial on how to make a music player in c++. Just a realy simple one with a play and pause button, a list of your s...
[no replies]
ofstream & ifstream
 
I am having a hard time with this code and this is my 1st time to this website and to writing code. #include <iostream> #include <fstream> #include <string> ...
[4 replies] Last: I hear what you are saying but this is for a school project and this i... (by jascns1012)
August 2014 Pages: 1... 22232425
  Archived months: [jul2014] [sep2014]

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