General C++ Programming (Page 5)

i think i have some errors with inheritance and templates
#ifndef DECK_H #define DECK_H #include <random> #include <string> #include <vector> #include ...
[2 replies] Last: (by ne555)
Allegro 5 - 'main' mixup
Hello there, I have encountered a problem with allegro 5. It says in the build output that: unr...
[1 reply] : Solved it! Turns out it was as simple as: #define ALLEGRO_NO_MAGIC_M... (by Irrelevant Elephant)
Date and Time as a string
This is what I have: #include <ctime> #include <string> using namespace std; void date_and_ti...
[1 reply] : Why would they? Your formats specify a digit in the last position. ... (by AbstractionAnon)
Design Pattern Exercises in C++
I have to give credit to JLBorges for inspiring me into practising a lot of design patterns in my pr...
[7 replies] Last: To avoid having to repeat the definitions for the four accept override... (by prestokeys)
Code fix
hello, can someone fix this for me? I can't seem to find where the problem is. #define WIN32_LEAN_...
[13 replies] Last: maybe... (by jasonwynn10)
help with queue
I am terrible at this and can't seem to make it work any help is appreciated. main.cpp #include <...
[4 replies] Last: It would be incredibly easy if you just read the error messages that y... (by ne555)
by Aralox
Working JNI example with Java 1.8.X?
Hi, I've just spent many hours trying to get a basic JNI example working. I'm trying to call java co...
[no replies]
how to parse eml file
I am doing a project processing emails in EML format. I searched for a library doing eml file parsin...
[4 replies] Last: Thx for your reply. Recommending any specified parser will be more hel... (by breadbread1984)
by ToniAz
Faulty use of constructor of dynamic array
Hello everyone, According to someone, one can initialize a dynamically created array in the follo...
[2 replies] Last: Thanks for the explanation! (by ToniAz)
searching binary file
Hello I am completely baffled by bin file read/write and positioning. Here I wish to search a chemic...
[5 replies] Last: void searchSymbol( char sym, chemicalElement chemEl ){ ... if(strcmp... (by dhayden)
Sorting using pointers
My program reads the numbers from input file and writes the numbers sorted to output file. #inclu...
[5 replies] Last: Please... please prefer A over *(A+i) . Please. My heart dies ... (by Disch)
Why does this code output this number (it should be different)
float i,m,n; float newsum=0; for (i=1;i<=10;i++) for (m=1;m<=10;m++) for (...
[2 replies] Last: wow, great idea coder777. (by gameprogrammer)
by DevTK
cannot access private members declared in class basic_ios<_Elem, _Traits>
I use std::fstream. I get the following compiler error: cannot access private members declared ...
[4 replies] Last: If the error is saying it cannot access the private data member then y... (by jheard901)
How to display numbers with decimals
float put; put = 6/120; cout << put; This outputs 0. Why is it so and how can I make it o...
[1 reply] : Numerator or denominator or both should be float. Example: #include <... (by Regeon)
by Necro
Error: Invalid use of non-static data member, in Nested Classes
To start with, I'm running windows 8 with Code::Blocks 12.11. My main goal is to create a class n...
[11 replies] Last: Hey, really sorry for not replying this long. I run into some trou... (by Necro)
Need Help in development of a fraction class
Write a class to handle objects of fraction type. In its simplest form, a fraction is just two integ...
[4 replies] Last: 1) Please use code tags for your code, to make it readable: http://w... (by MikeyBoy)
having negative 0 as my result after multiplying zero with a negative number
guys I need your help on an error am having. I multiplied 0 by -4 and my result is -0 instead of 0. ...
[2 replies] Last: that was helpful, tnx (by N495t4r)
reference operator
why it is necessary to use the reference operator here ? const string& content() const {retur...
[2 replies] Last: What giblit says. It's to avoid copying the string unnecessarily. (by Peter87)
Stuck on student project, classes and objects
Working on a project for a c++ class and got a bit stuck. Hopefully someone can guide me to the sol...
[2 replies] Last: Hello @joebrady. The links u gave are not opening. Would u please sen... (by Sanjay97)
Dropbox Access
So I'm trying to create a simple code that runs in Visual Studio to connect to the Dropbox website, ...
[1 reply] : (by LB)
Pages: 1... 34567... 27
  Archived months: [jul2014]

Cannot post in this page. To post a new message, go to the first page.