General C++ Programming - March 2012 (Page 2)

Hello :) A* algorithm trouble
 
Hello I'm a new member of this forum, anyway to business I've been trying to make a app which searches the shortest route between point A and B in a coordinate ...
[2 replies] Last: they don't do the same thing, they move for different locations. x+, y... (by DonTodor)
Error Involving Arrays
 
I'm trying to write a program that asks the users for a set of numbers which the program then sorts and counts the frequency of. I'm struggling with understandi...
[3 replies] Last: umm you have arraySize defined as 0... so it goes doesnt itterate thro... (by GFreak45)
I think it's almost there!
 
hey guys, Im working on a project for school. I have the majority of the coding done ( or so I hope) but i cannot seem to figure out how to get a total.... ...
[2 replies] Last: So do lines 67 and 68 need to be moved up under line 26? (by teague00)
Vector subscript out of range.
 
why does this generate the error "Vector subscript out of range." for (std::vector<Grenade>::iterator it = Grenade_Vector.begin(); it != Grenade_Vector.end(...
[12 replies] Last: Should/shouldn't stuff assumes you know more about the code than you ... (by cire)
by jae
It's not doing what I want it to.
 
hello everyone Heres the summary of my project. I am given 2 large .txt lists. The first is a list of 6 letter words. The second is a list of words that c...
[no replies]
Output 3 times more than what i tell it to..
 
Why is this code outputting my level 3 times after the battlePhase ends? void battlePhase(Player1 &player, Boar1 &boar) { cout <<"You have run into a Boar...
[12 replies] Last: If you move the level system into boar.health ==0 part you don't need ... (by vin)
my programs function wont return
 
Hey guys I made a program where we need a function to do th paycalculations of an employee and i am having trouble returning the values from the function when i...
[9 replies] Last: What is the value of rhrs which you are assigning to hours? It is your... (by vlad from moscow)
Superclass and subclasses
 
Good day cplusplus.com and fellow members!. I was wondering about the coding here. //main.cpp #include <iostream> #include <string> #include "class.h" ...
[3 replies] Last: If you look at the first error you have posted... 1>c:\users\brandon-... (by clanmjc)
HOW TO GET 1,000 to be read as 1000 and decimal point C++
 
Hi I need help when i put in a number as a parameter using float and atof() I want a basic coding to make 1,000 to be read as 1000 instead of 1. Als...
[8 replies] Last: @Cubbi Thank you I never knew that I can also use preprocesser even in... (by Danishx83)
by rucafe
default constructor
 
I have the following class defined class SearchElement { public: int m_step_id; int m_track_id; float m_energy; SearchElement() { int m_s...
[3 replies] Last: Oooops. Of course. Thanks a lot!! (by rucafe)
C++ - Win32 API - A Window Does Not Appear
 
Hi, programmers! I was experimenting with Win32 API & eventually ran into a problem - window I want to create does not appear at all. Command line appears as...
[no replies]
using c++ program to add 100 users to windows server 2008
 
hello there, our professor has assigned us this assignment. and he gaves source code to modify too. As an assistant IT director at SOSU.COM, you are asked ...
[6 replies] Last: thanks xerzi but that looks even more complicated to me....i am strugg... (by gagankhadka)
Templating
 
Hi guys. I'm having problem with template. Please enlighten me. The files are listed below. BinaryTree.h #ifndef BINARYTREE_H #define BINARYTREE_H #incl...
[5 replies] Last: If you want to keep your template definitions in your .cpp file then y... (by clanmjc)
SQL Query a csv file in C++
 
I'm trying to write a code to use SQL query statement to read a csv file in MSVS 2008. is this possible? my query string is SELECT PremiumID FROM openro...
[no replies]
Getting index of matched pattern in Boost::regex
 
I need to get the index at which the pattern is found while iterating through each loop. I tried with distance but I am getting compile time error. Is it poss...
[no replies]
by abhi89
URGENT HELP NEEDED ...file open mode issue in c++
 
I HAVE MADE A C++ CODE in which when i open files in read mode it doesnt work while when i open it in write mode it works ...the files i want 2 read already ...
[3 replies] Last: Since it works when you create the file with "w+" but not when you try... (by cire)
Prevent destruction when leaving scope
 
I am creating a text adventure where items have a virtual ITM class and sub-specific classes, ie. door Door; ITM* p0001 = &Door; [\code] I need the items to b...
[11 replies] Last: int *y = dynamic_array<int, 20>(); I don't get how this is supposed... (by closed account S6k9GNh0)
Local variables
 
Why are our local variable numbers being wiped out and replaced with 302, it has happened on several different computers?
[18 replies] Last: // Play the sound. dbPlaySound(PERFECT_SCORE_SOUND); ... (by Kevinp812)
by gumbe4
Stack eval gives wrong output
 
I wrote a program in C++ that requires my program to read a textfile which should only contain standard arithmetic operations and then to output the results of ...
[no replies]
Making endless grid
 
I want to make a grid of objects. I know how to use an array such as int grid , but I want to be able to insert an object at any point in the grid so I am pl...
[5 replies] Last: Yes, you understand right. A set is used for storing unique items -- s... (by Duthomhas)
March 2012 Pages: 1234... 49
  Archived months: [feb2012] [apr2012]

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