General C++ Programming - June 2013 (Page 18)

C++ Primer 5e vs C++ Primer Plus 6e
 
Which one is better for beginner If i just wanna buy one book
[1 reply] : C++ Primer 5th Edition is more of a reference book than a book for beg... (by Pebble)
C++ Templates
 
I just started getting into templates.I am trying to code this so it supports all data types instead of just int. i know what i did is wrong for sure. please sh...
[3 replies] Last: Does it compile? (by firedraco)
Information on Non-default member class whose argument is another class
 
Hello All, I have 2 sets of code. Once compiles and the other doesn't. But I don't understand why. Can somebody please help? I started coding cpp just...
[11 replies] Last: You're welcome! (by MikeyBoy)
Check for symbols
 
I need a function to check if the inputted string contains a colon. It has to be in an if loop as the condition.
[1 reply] : If you mean a character array then you can use standard C function str... (by vlad from moscow)
Using memory pools
 
How can i use memory pool with a char array? Is there a way to allocate memory somewhere in the middle of the array? i.e. allocate memory in chunks. eg. al...
[7 replies] Last: Hmmm... maybe it's too involved a question for here? But there is qui... (by andywestken)
A quick problem reguarding strings
 
Hi there, I am very new to C++ and I am encountering a problem in my work. I have a program that Adds, Removes, Sorts, Finds, and Displays character inputs, su...
[6 replies] Last: Perhaps an example? Keep in mind I am very new. I started a class le... (by thebawt)
string add
 
if string str = "sfsdfsd" and i want to add like str +str but it return some integer value why? and how to fix it?
[3 replies] Last: Even better, you could you post a small, complete program that illustr... (by andywestken)
C++ Generic Problem
 
#include <iostream> using namespace std; template <typename T> void swap(T & a , T & b); template <typename T> void swap(T & a , T & b) { T tem...
[3 replies] Last: You can write simply :: swap(n,k); (by vlad from moscow)
Game Engine for a 2D RTS
 
OK, so I have dabbled in C++ for a considerable length of time, and have decided to make a game. Specifically a 2D RTS. This is to be my first 'big project'. ...
[2 replies] Last: Thank you very much indeed! I'll check it out. (by closed account oL3pfSEw)
How to avoid if fstream opens a directory (infinite loop)?
 
If the filename below is a directory, then the following loop goes to infinite. std::ifstream in; in.open(filename, std::ifstream::in); if(in.fail()) ...
[1 reply] : Just don't use while (!in.eof()) . Check the result of getline() inst... (by Cubbi)
Safest Driving Area
 
Problem: Write a program that determines which of 5 geographic regions within a major city (north, south, east, west, central) had the fewest reported traffic a...
[1 reply] : it shows me the memory address of the string variables The solution... (by cire)
Make the most of 32/64 bits architecture
 
Hello everyone, and thanks for your valuable time :-) I would like to know how to make the most of 32/64 bits CPU architecture (if it is possible...) As I unde...
[no replies]
PLEASE HELP ! need to Implementation FSM class in Cpp
 
this my prototype. Thanks for help FSM in C++ // definition of user-defined action routine. Action routines are called by function Fsm::fire() with // two pi...
[no replies]
Null Pointer problem
 
If anyone can help identify the problem here, that would be excellent. Now I have this class QuadTree and QuadNode. I call the following from Main: ... Ter...
[2 replies] Last: oops... thanks Cire, much appreciated. (by Sam Faynzilberg)
Video game programming
 
How would you create a video game in c++? I'm not sure really how to display the graphics and set properties and do all that stuff. I don't have money to buy a ...
[2 replies] Last: Or the two libraries that are used most for 2d game programming: SFML ... (by Fransje)
by klw
What size to use for reading binary?
 
My binary file size is 88200000 bytes, but each element should have 2 bytes. So when I use "infile.read( block , size)" , should I be using the size of the ...
[1 reply] : > when I use infile.read(), should I be using the size of the file or ... (by JLBorges)
Best book to learn about algorithms and data structures?
 
My friend reccommended me to go for this one: http://www.amazon.com/Data-Structures-Algorithms-Second-Edition/dp/0534375979/ref=zg_bs_132570011_15 And everyo...
[1 reply] : The Cormen book is heavy reading if one does not have a strong mathema... (by JLBorges)
QtCore4.dll was not found - codeblocks and Qt
 
This is the error when i compile and run a simple program in codeblocks "this application has failed to start because QtCore4.dll was not found. Re-installing t...
[4 replies] Last: Well, i guess i think theres no error in my code, here it is #include... (by hotcoffee)
by soori
"cout<<" and operator overloading...
 
gud mor friends, Please help me understand the below concept:: i have this below fun for << operator overloadin: class Time { private: int m...
[2 replies] Last: Thanks zhuge knowing it ll ignore return value was a great relief...!!... (by soori)
world map
 
My program reads GPS packets from the serial port. I want to be able to see the location in those sentences (some of which contain x,y coordinates) in a map. ...
[no replies]
June 2013 Pages: 1... 1617181920... 28
  Archived months: [may2013] [jul2013]

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