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

compile for very long expression
 
Hi All, I am working on a project for modeling robotic dynamics. It requires to compile very very long c++ expressions produced by a symbolic tool. One of th...
[3 replies] Last: Try making the variables volatile qualified with external linkage. ... (by JLBorges)
by piotr5
is there a simpler way to write an abs function?
 
first off the requirement is, my integer class has no copy-constructor, instead it's a child of: template <class T, class B = EmptyClass> class DeepCopyOption...
[7 replies] Last: @nayonrony: I'm not sure why you copypasted JLBorges' post, but I did ... (by LB)
Error
 
Now getting this error when compiling this macro: Undefined symbols for architecture x86_64: "_main", referenced from: implicit entry/start for ma...
[8 replies] Last: I'm also somewhat fearful of having to work within the limitations of ... (by shadowmouse)
move contructor and move assignment for a union-like class
 
Is there a better way to write a move constructor and move assignment for the class below. // g++ -std=c++14 main.cpp Token.cpp -o z -Wall -pedantic #include...
[2 replies] Last: @JLBorges Thank you, hope I've done it right this time. Token::Toke... (by ChajusSaib)
expected class name error
 
Hello lads, I seem to be having an issue with a simple program. The error messages I am getting is this: main.cpp: In member function ‘Token& Token::opera...
[8 replies] Last: @JLBorges Thanks again mate, totally flew over my head. (by ChajusSaib)
Key Reading
 
I know I just posted a newby post but I have another one. I have bought c++ books and searched the web but still can't figure out how to make the code read when...
[8 replies] Last: Oh, look, they're doing it to me now. Some people are easily amused, ... (by MikeyBoy)
by pfjf2
sfml - drawing text
 
Hello, I am having difficulty drawing text to a window using SFML. My code is below : #include "stdafx.h" #include <iostream> #include <SFML/Graphics...
[3 replies] Last: More then likely it isn't loading because you don't have the font insi... (by Z e r e o)
by royeh
Not running well in writing data in a csv file in VS2013
 
I am trying to write data to a cvs file and is working great. There is only a problem that I have to close after inserting data for the next one. I was working ...
[no replies]
by yj1214
Using OpenGL to make GUI
 
Instead of using libraries like Qt, wxWidgets, GTK+ etc. is it a good idea to make GUI using only pure OpenGL? Let's say I made a GUI program with pure OpenG...
[2 replies] Last: Something that should be mentioned is that writing a UI library from s... (by TwilightSpectre)
Is this a bug ?
 
is this a bug in the compiler ??? this doesn't compile #include <stdio.h> typedef struct { unsigned int HH,MM,DD; } Jam; int main(){ Jam Jam...
[1 reply] : C++ is case-sensitive, so JamAkhir and JamAKhir are not related. ... (by LB)
Deleting a char array from the Heap
 
Alright so I've written a function that returns a pointer to a char array on the heap. So my code looks something like this char *ptr = func("This is the argu...
[2 replies] Last: I used gdb to check this. But I was just being stupid. I assumed tha... (by ForTheReallys)
Writing GUI Applications in C++
 
I am quite experienced with C++(programming for over 1 year),I know how to make CLI/Console Programs,but I cannot wrap my mind over GUI programming in C++,Every...
[6 replies] Last: Qt is great, if you don't mind the GPL/LGPL. For other options, see... (by Duthomhas)
does output_iterator_tag imply non-terminating sequence?
 
In other words, can I assume that an output iterator (http://www.cplusplus.com/reference/iterator/OutputIterator/ ) can safely be written to without fear of bo...
[8 replies] Last: Yes. template <typename Iterator, typename Category> struct... (by Duthomhas)
by Sid123
Code compiles and starts running, then stops? no errors found though?
 
The code is too long to paste here but does anyone know what could cause "project.exe is not working on windows"? the program compiles fine and there are no bui...
[7 replies] Last: The debugger is the most helpful tool in all cases, both when you are ... (by LB)
by JDev
Seeking a Mentor
 
I have been dabbling with C++ for a few months now having read a few books and finding resources over the internet, but haven't engaged in socializing with team...
[6 replies] Last: Run /server chat.freenode.net and then /join #cplusplus.com in hexchat (by fabtasticwill)
by aeck
Big O Notation
 
Question: for ( j = 0; j < n; j++ ) { for ( k = j; k < n; k++ ) { <some operation> } } Algebraic Expression: n(n+1) = n^2 + n Big ...
[3 replies] Last: Yes. See https://en.wikipedia.org/wiki/Triangular_number (by helios)
Verification of code
 
hi can someone advise me on why my programme code cannot run properly. The program supposed to prompts the user to enter a number ranging from 0 to 9999. the pr...
[3 replies] Last: #include <iostream> int main() { bool has_1_2_or_3 = false ; // ... (by JLBorges)
Is it possible to do this?
 
Is it possible to make a program create file with certain data points, and then load the file and read the data inside? (Sorry If this is a newb question i'm qu...
[5 replies] Last: No, it doesn't handle graphs, but I'm actually working on a generator ... (by helios)
by leourb
Custom Iterator for list<class>
 
Good morning. I have a problem regarding iterators and custom classes. I confess that I am not so confident with them and I am finding difficult to set in mind ...
[2 replies] Last: Okay.. It is actually working.. Thank you Peter87. (by leourb)
function to cal avg, put in performance formula and compare
 
Hi all, need to do a function to cal avg, put in performance formula and compare Performance = (Annual Average Actual Output Capacity / Annual Average Expec...
[1 reply] : We can see that each element in the 2D array is a MachineType struct. ... (by keskiverto)
August 2015 Pages: 12345... 17
  Archived months: [jul2015] [sep2015]

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