General C++ Programming - May 2013 (Page 10)

Errors?
 
Hi, When I compile my program I get an error saying i have undefined references and I don't know why this is happening. This is the whole error: /tmp/user/215...
[6 replies] Last: I'm using gcc -std=c++0x P1.cpp (gcc P1.cpp doesn't work properly) and... (by Gabz21924)
by CroCo
Why global variables are evil?
 
I've seen numerous people state that global variables are evil while I came across some libraries depend heavily on them. I assume in my question that the progr...
[4 replies] Last: @Daleth, Thank you for these links. They are very good especially the... (by CroCo)
"lvalue required asleft opperand of assignment"
 
Hey, I have a code that uses the atan function but I want it to be able to say what the angle is given what quadrant you are in but I keep getting an error mess...
[8 replies] Last: Ooohh, okay. That makes a lot of sense. I got it to work :). I appreci... (by MatthewK)
N-Ary tree represented in a Binary Tree
 
HI, i have to do a N-Ary tree and i followed the example of this page http://blog.mozilla.org/nnethercote/2012/03/07/n-ary-trees-in-c/, where the root only poin...
[3 replies] Last: my understanding/definition of n-ary trees seems different. i underst... (by SIK)
STL iterator problems
 
I can't seem to make the STL iterator class work how I need it to. I am implementing a multi list graph and I need to iterate through my STL list of Vertex poi...
[2 replies] Last: RAII ? my error is line 6... For some reason I'm having trouble gett... (by tay1392)
Sudoku Solver Problem
 
I am having some trouble with a sudoku solver I wrote. It solves around 80% of the puzzle and then gets stuck on the last few spaces. At the end there's always ...
[1 reply] : If there aren't any legal options left then your code isn't solving th... (by BigBlackSheep)
Atan2 Issue
 
Hi I am writing a program using directx and I have come across a problem. I have several models which display pathfinding behaviour but I am struggling to...
[5 replies] Last: Thanks for the input All solved now. The problem was with the re... (by phantompig)
by Daleth
How to properly cite a source in code
 
For example, if one researched how to deep copy a map container and paraphrased a solution from a website, what is the proper format? Are there standards for ci...
[4 replies] Last: Thanks for the example, JLBourges. I really do appreciate the help. (by Daleth)
First C++ Game!
 
Hi guys! This is my first c++ game, I made everything but the music. All feedback is welcome. And yes, there is a little glitch with the ball that happens som...
[4 replies] Last: Okay, I'll learn that then! :D And thanks for the tips man. (by Guilherme Oliveira)
Error: undefined reference to...
 
Hi all, new to the forums. Been learning C++ lately and have been converting some of my older QBasic games into C++ for practice and am having a blast learning ...
[8 replies] Last: [quote=MilesAway1980]Now, are global functions acceptable? Of course ... (by MiiNiPaa)
problem with a function declared as const
 
Hello, I need an opinion on the way I solve the following problem: CLASS_NAME contains an object CLASS2 named G2. That contains some large arrays, and some fu...
[1 reply] : If some_func() isn't const it shouldn't be used in const fucntion. N... (by MiiNiPaa)
Multithreading with async, only a 4x's speed up?
 
I am new to multithreading in C++11 with Visual Studio. I am trying to test the speedup of my code using async, and I am only getting a 4x's speed up (when I s...
[8 replies] Last: I tried another clock, http://www.cplusplus.com/reference/chrono/stead... (by Donnafoo)
by Alam
Linked list
 
How we can i link different datatypes in a single linklist???????? Plzzzzzzzzzzzz help!!!!!!!
[1 reply] : Why do you need that? How do you think you will retrieve those values ... (by MiiNiPaa)
input from screen
 
hello i was we ondering if it is possible to write a program that can read the characters that are currently displayed by some other program (for example just a...
[3 replies] Last: This might help: http://stackoverflow.com/questions/4839623/getting-pi... (by Fransje)
Lambda Expressions
 
In this code: // Ex10_15.cpp Using lambda expressions #include <algorithm> #include <iostream> #include <iomanip> #include <vector> #include <ctime> ...
[2 replies] Last: Alright thanks! (by Anmol444)
by Mats
Searching Class Variables
 
So I have a class: class player { public: short int health = 5; short int damage = 5; string name; }; int main() { player one; o...
[1 reply] : store each instance in a vector like: std::vector<player> playerLis... (by abhishekm71)
by kienme
What is wrong
 
This piece of code is not working as desired. char str ="This Sample Example", neww ; int i,j,k, counter=0; for(i=0;str !='\0';++i) { if(str =...
[2 replies] Last: Brilliant! Thanks a lot! :) (by kienme)
Need Help With School Assignment
 
Hey Guys I need help with this school assignment.It is about Arrays mixed with functions.Basically I have no idea where to start and how it should be done. So p...
[1 reply] : Dupe: Please respond there. http://www.cplusplus.com/forum/beginner/1... (by cire)
lower_bound(), upper_bound(), and equal_range()
 
Why use these functions? I looked at the reference on this site, I read about it in my book, looked at it on msdn and I still dont get it. I got it's for search...
[2 replies] Last: Thank you cire. I wont be asking any more questions in this forum now... (by Anmol444)
glfw slow
 
I use glfw and Dev C++ 5.4.1. I created code in my game to limit the frames rendered to 60 for cards that don't have vsync. Compiled the program, and CPU usag...
[1 reply] : CPU usage is insane This is normal. Without vsync, the only way to li... (by helios)
May 2013 Pages: 1... 89101112... 47
  Archived months: [apr2013] [jun2013]

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