General C++ Programming - September 2017 (Page 11)

Boost ASIO async operation
 
I have read the tutorials from the boost docs. I care more about the async operation framework. What I need is: After finishing a function 'A', call ...
[1 reply] : > Should I create a timer whose expired time is 0 No; the tutorial ha... (by JLBorges)
A program using array. It doesn't work well!
 
#include <iostream> using namespace std; void getScores(double testScores ); void showMenu(); char getChoice(); void displayResult(char userAns, double testS...
[6 replies] Last: If the compilation fails due to code that the compiler does not unders... (by keskiverto)
by fmad
A better way to define class id
 
Hello. Currently I define class ids as follows: class Base { public: static unsigned typeId() { return s_typeId; } protected: static unsigned s_typeCo...
[4 replies] Last: mbozzi This looks good. Thanks. (by fmad)
Need help please!
 
I'm trying to get it to calculate the students final grade for the class. I can't get it to work. Been trying for 2 hours, please help :) #include <iost...
[2 replies] Last: Thank you so much! That worked perfectly. (by Brandon33310)
Draw a line
 
Hello everyone, I have been searching how to draw a line (horizontal and vertical) using ncurses, but couldn't find any examples. Therefore, I am in a situation...
[3 replies] Last: Perhaps this might help: #include <ncurses.h> int main() { //Init... (by timh1970)
Would you class this as a bug;
 
Ok, so this was my bad as I did a rookie off by one error, but this should not have happened anyway; what do you think? #include <iostream> class myClass { ...
[13 replies] Last: You are a star! -Wall doesn't make a difference on its own but g++ T... (by timh1970)
Weather Code Help!
 
Could someone help me solve this. Not sure why it wont keeps freaking out on me. I think my compiler is broken or I am totally missing something because it keep...
[2 replies] Last: Cheggs to the rescue http://www.chegg.com/homework-help/questions-and-... (by closed account 48T7M4Gy)
by Axrdf
CMake and Gtest
 
Hi guys. I know the topic is not strictly connected with General C++ Programming but there is no another one which fits better. I made small project in CL...
[no replies]
by subba
How to use C++ Classes in C
 
How to use C++ classes in C source code. I want to declare a C++ object in C source code and call its method. Please advise. Thanks, Subbarao
[1 reply] : If the C++ type is not a PODType , http://en.cppreference.com/w/cpp/c... (by JLBorges)
Using a header file on an online compiler
 
Is it possible for a C++ program run on an online C++ compiler to include a user-defined header file? #include "myheader.h" I'm presently using http...
[10 replies] Last: The scheme outlined above works well for multiple header files as well... (by SSteven)
A little help with calculating the area of a square and circle
 
Hi all, I am having a bit of trouble when I run my program calculating the area of a square and circle. Everything works out fine but if I have the length o...
[3 replies] Last: Thank you guys very much. I am a beginner in the world of C++ and I a... (by Jdawg32)
Why does fstream operator<< return basic_ostream<char>&?
 
I overloaded my class' operator<< to accept a file stream and a class object fstream& operator<<(fstream& file, const Obj& obj) { file << obj.toString(); ...
[8 replies] Last: Sometimes I think the implementation won't change... but if I need som... (by gedamial)
how can i do that
 
i need to write a C++ program that outputs all distinct points from a given list of 10 points.where each point has x and y values (in the 2D plane) For example...
[3 replies] Last: When searching the array as in function PointInArray() above, no nee... (by Chervil)
Run out of memory!
 
Hello, I was recently running a self-made programm in C++ and I got the following message during execution in the command window: terminate called after thro...
[11 replies] Last: Glad it is working. For what you appear to be doing you can loop roun... (by zaratustra)
Why is my "Universal" Constructor called twice? (1,2)
 
Look at this code template <typename T> class MyClass { public: // Copy Constructors MyClass(const MyClass& other) { cout << "first copy ctor" << end...
[28 replies] Last: This is so subtle! Thank you very much... I think I'll get away from ... (by gedamial)
build c++ project
 
Hi! Can you help me building this game? : https://sourceforge.net/p/open-chicken-invaders/code/HEAD/tree/trunk/ Unfortunately I get a lot of errors from boost...
[1 reply] : have you downloaded and built boost on your machine? is there any chan... (by jonnin)
can't find .h file in dir next to it
 
Here is the tree left (top) to right (bottom), up and down = || "Tutorial" app folders Shaders----test_fs.glsl, test_vs.glsl | Utils------...
[2 replies] Last: I did (before your post), but couldn't get it working Now your sugges... (by technologist)
Generate random numbers and create function with more than 1 return
 
So i want to create a function that generates 2 random numbers and adds them together. And also return more than one value(as in return the number generated and...
[2 replies] Last: vector<int> yourfunc() //function that returns more than 1 integer, ... (by jonnin)
Trouble with Code::Blocks and C++11 standard
 
Hello guys, at first: I'm not completely sure if this is the right subforum, so please tell me if it's wrong and move it to the right section. And I'm German...
[6 replies] Last: Oh, it was the Code::Blocks path you meant... OK, that explains why it... (by olfibits)
Question on how to do threading
 
Hi, I am new to C++ and this website. -- (Skip my rant and read the next paragraph) -- I am coming here because I need help and I am so fed up with Stack O...
[3 replies] Last: But when the game loop starts it will not stop. In your code sample,... (by Cubbi)
September 2017 Pages: 1... 91011
  Archived months: [aug2017] [oct2017]

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