General C++ Programming - June 2012 (Page 32)

String Table
 
I am designing a rather large project (20 + source files) and would like to keep string literals in a string table so that they can be accessed throughout the a...
[no replies]
Infinite loop
 
template<typename K, typename D> void Graph<K, D>::BreadthFirst( void (*visit) (D data) ) { queue<Vertex<K, D> > queue; Vertex<K,D> temp; list< Vertex<K, D>...
[no replies]
8086 emulator testsuite?
 
Are there any 8086 emulator test suites out there? I've made an emulator, trying to run MS-DOS 3.3, but when i run it i get an invalid OPcode 0x68? (From the b...
[no replies]
by JJJSSS
How do you calculate distances between coordinates and calculate the total perimeter?
 
T getPerimeter(T x , T y , T p , int numDataPoints){ T delX, delY, dist, totalPerimeter; for(int i = 0; i <= numDataPoints; ++i){ delX = x -...
[10 replies] Last: Haha. Yeah I understand. I've drawn it out and have been staring at ... (by JJJSSS)
Whats the best way to organize MANY functions?
 
Im working on a personal project with at least 20 (probably more) user-made functions. What's the best way for me to go about organizing them? Should I create a...
[16 replies] Last: Cool. That sounds like a great approach for me to experiment with. Oth... (by pholotic)
overloading switch statement?
 
I have a stylistic problem with if statements (especially nested if's). What I want to do is use something that resembles the switch statement but make that a t...
[no replies]
Vector of Object
 
Okay, I'll try to explain the issue I've ran into: Let's say I have two classes named NPC and MOVER. Both of those classes are derived from a class named SP...
[5 replies] Last: Thank you so much! I just got up, but I've read through the code you ... (by tannerwilson)
Detecting if object on Stack in destructor
 
Is there any way of determining whether an object being deleted is on the stack while in the object's destrutor?
[4 replies] Last: Thanks JLBorges; I looked at are article and will be looking at More ... (by aschwarz1309)
Linked list
 
Hello, I'm finding linked list hard to learn, I need ---- understanding it.
[8 replies] Last: Ok, I will try. (by Guitars)
Makefile automatic variable problem
 
Hi, I created a post here: http://cplusplus.com/forum/unices/72313/ about a problem I'm having with the % automatic variable in a dependency list. I f...
[no replies]
Editing a output?
 
Okay so my program reads a line from a text file then displays it on to the console. So... I want to be able to edit the line on the console. Example: The ma...
[no replies]
by Bouya
char and hex
 
hi did any one know how can i fill a char table with hexadecimal number to be read after byte by byte i find the exemple in c language : char y = "\x...
[5 replies] Last: Are you looking to convert a sequence of bytes that correspond to the ... (by Cubbi)
openGL + freeglut problems.
 
so I've pretty much finished console application programming and it's a lot of fun, but I've been trying to find out how to start doing graphics and window appl...
[6 replies] Last: Clutter is another option. It renders with openGL so it's hardware ac... (by htirwin)
writing a program for contact management software
 
Hey guys i am a new programmer and i am writing a program to store contact information and store it into a txt file.Then provide a search option to find i...
[no replies]
Another unkown error
 
Any ideas what I should look for from this? I've tried using breakpoints to find where it complains but that didn't yield much - Got to exe.Printf( wxT( "%s" )...
[3 replies] Last: Never mind I found what I needed: bool LaunchExe( xStr path ) { xSt... (by awsdert)
accessing structs from another function in a class?
 
i am currently making a 2d tile engine, and for my map i use an array of a custom made tile structure. this creates a small problem for me, since i cant seem to...
[3 replies] Last: found a way to do it, thanks anyways :) (by even821)
by atsa1n
Problem reading a text file
 
Trying to read a text file file but I have been running into troubles. Below is the content of the file that I am using 0.001 0.002 0.003 0.004 0.005 ...
[6 replies] Last: Got it finally, and you are absolutely right that the issue was with M... (by atsa1n)
Total not processing correctly
 
Hey all I've written a program that is designed to add records which include, itemId, itemPrice, discount, quantity. It then adds the Item prices of all the re...
[6 replies] Last: please share ur entire code after modification.And there is no need fo... (by SirSmilesaLot)
Is using namespace std; really worth it?
 
It's quite common among beginners to put int a using namespace std; so they wouldn't have to type the fully qualified name for anything included in headers. ...
[6 replies] Last: > Good point, but that is always the danger of using namespace x; The... (by JLBorges)
READING and Writing Files
 
Hello, still kinda of a newbie. I have a problem. How come the line "Hello world" wasn't printed out? #include <iostream> #include <cstring> #include ...
[3 replies] Last: @redfox814 am also a newbie but what @firedraco told you is true,you o... (by ozone)
June 2012 Pages: 1... 30313233
  Archived months: [may2012] [jul2012]

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