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

sourge engine
 
someone knows how i compile it?
[6 replies] Last: Again, by websearch of the error message: http://stackoverflow.com/que... (by keskiverto)
i think i have some errors with inheritance and templates
 
#ifndef DECK_H #define DECK_H #include <random> #include <string> #include <vector> #include "LQueue.h" class Deck : public LQueue<Card> { publi...
[2 replies] Last: http://www.cplusplus.com/forum/general/113904/#msg622073 (by ne555)
Allegro 5 - 'main' mixup
 
Hello there, I have encountered a problem with allegro 5. It says in the build output that: unresolved external symbol _main referenced in function ___tmai...
[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_time(string &date, string &time){ time_t current_time; ...
[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 programming. As far as I know, there is no design patterns exe...
[7 replies] Last: To avoid having to repeat the definitions for the four accept override... (by prestokeys)
help with queue
 
I am terrible at this and can't seem to make it work any help is appreciated. main.cpp #include <iostream> #include<string> #include <cstdlib> #include "m...
[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 code from c++. The most promising tutorial was from here:ht...
[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 parsing and got no hits. I really dont want to code the parser mys...
[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 following way: unsigned int * vec; // ... do something to ...
[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 chemical name info by symbol. Here is my struct struct chemicalE...
[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. #include <iostream> #include <fstream> #include <string.h> #includ...
[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 (n=1;n<=10;n++) if (i<m<n) { ...
[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 in class basic_ios<_Elem, _Traits> When I go to the error...
[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 output 6/120 in a more precise way?
[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 named SCREEN with a member Array and have this Array being ...
[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 integer values: a numerator and a denominator. fractions can be n...
[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. I tried to change the data type put It won't work. this is ...
[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 {return data;} Example in http://www.cplusplus.com/doc/tutorial...
[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 solution. What I am trying to do is include a class for calc...
[2 replies] Last: Hello @joebrady. The links u gave are not opening. Would u please sen... (by closed account LbXjz8AR)
Dropbox Access
 
So I'm trying to create a simple code that runs in Visual Studio to connect to the Dropbox website, lets the user login and then uploads text files. I'm really ...
[1 reply] : https://www.dropbox.com/developers (by LB)
August 2014 Pages: 12345... 25
  Archived months: [jul2014] [sep2014]

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