49,756 Topics

Member Avatar for
Member Avatar for new2programming

I am using Visual C++ 2010 express edition and i am making classes but when i run i get the error: 1>c:\documents and settings\louisa\my documents\visual studio 2010\projects\ninja wars\ninja wars\game.cpp(71): error C2065: 'm_pScreen' : undeclared identifier [ICODE] In my Game.cpp i have this code void Game::Draw() { Sprite::Draw(m_pScreen, testSprite, 0, 0); …

Member Avatar for griswolf
0
170
Member Avatar for J_A_L

Hey guys I'm having a lot of trouble getting this program to work. I want to keep an inventory of different tools using a random-access file that shows the name of the tool, how many of each tool I have on hand, and the cost. I then want to put …

Member Avatar for J_A_L
0
149
Member Avatar for jimJohnson

I am trying to write an algorithm to determine the average of a linked list of real numbers with the first node pointed to by first... ptr = first; while (ptr != null_value) { //not sure what to put in here } Can someone take a look of this short …

Member Avatar for jimJohnson
0
179
Member Avatar for jimJohnson

I am working on another linked list problem...really been struggling with this chapter dealing with lists...Here is the instruction for this example... Write an algorithm to search a linked list with the first node pointed to by first for a given item and, if the item is found, return a …

Member Avatar for VernonDozier
0
98
Member Avatar for Violet_82

Hi there, quick (and I am sure) simple question on a program I have just created. here's the code: [CODE]#include<iostream> using namespace std; int main() { char letter; int counter=0;//set the counter to 0 for (letter=65; letter<=122; letter++) {if ((((((letter==91)||(letter==92)||(letter==93)||(letter==94) ||(letter==95)||(letter==96))))))continue; counter++;//increment the counter in the loop if (counter==27)//counter condition …

Member Avatar for Violet_82
0
158
Member Avatar for helpfullProgram

Hello daniweb forum members! Just a quick question which has hindered my programming greatly. I am creating an online role playing game: vorii - [url]http://www.youtube.com/watch?v=ePNxDlZ2H7Q[/url] And I have come across a problem with the chat interface. The way I have programmed my game is that each player as a place …

Member Avatar for mrnutty
0
162
Member Avatar for manvis2484

I can compile and run the program, but cannot output the text file and print the member list result. Anyone can advice the solution? Thanks. 1. Add new member information 2. Print member list 3. Exit #include<iostream.h> #include<fstream.h> #include<dos.h> #include<conio.h> #include<stdlib.h> #include<stdio.h> #include<string.h> #include<iomanip.h> struct student { char Stdid[7]; char …

Member Avatar for Ancient Dragon
0
229
Member Avatar for corby

hey guys/gals. i get a segmentation fault whenever the for loop in the print function is executed. any suggestions? im not sure what i did wrong. [CODE]//class member functions #include "experiment.h" #include <iostream> #include <fstream> #include <cstdlib> #include <iomanip> using namespace std; int Experiment::numberOfTests = 0; Experiment::Experiment(){} void Experiment::setExpName() { …

Member Avatar for Ancient Dragon
0
160
Member Avatar for nishankyadav

HI, i am Nishank and have got a project -to make periodic table by using the following a. Data Structure b. Object Oriented Programming in C++ c. Data File Handling through the program the user should be able to: a.view the periodic table b.edit the periodic table c.delete a record …

Member Avatar for Ancient Dragon
0
6K
Member Avatar for Roses89

Im trying to access the objects in the vector array that ive created in the bid class. I need to access the first ask bid and then continue to compare the price and the quantity with the first buy bid. I dont understand how on EARTH im supposed access these …

Member Avatar for NathanOliver
0
126
Member Avatar for anusri555

Hai friends, Me too have some doubts regarding C++. What happens if a pointer is deleted twice? Which is a better option --pass by value or pass by reference ?

Member Avatar for NathanOliver
0
66
Member Avatar for prototyppe

Hello guys, My problem is that my code will automatically go through: [code]if((ask[i].getPrice()) <= (buy[j].getPrice())){[/code] where ask and buy are vectors. I need to know how I am suppose to compare them based upon the getPrice()...... Thanks in Advanced. The rest of the code is here: [code] int i=(int)ask.size(); int …

Member Avatar for NathanOliver
0
60
Member Avatar for BLKelsey

Hey all, I've elected to write a console hangman game and I've completed it just fine. However, one thing is evading my logic as to why it wouldn't work. I want it to "appear" to LOAD GAME" at the beginning like so: "LOADING GAME....." The total wait time I want …

Member Avatar for mitrmkar
0
103
Member Avatar for Roses89

I have a class which accepts vectors from another class called trader. This is the simulator class: [code] #include<vector> using namespace std; class Simulator { Trader trader; Auctioneer auction; public: void run(); }; void Simulator::run() { trader.setBid(); auction.BidID(trader.getBidID(vector<int>)); auction.TraderID(trader.getTraderID(vector<int>)); auction.Quantity(trader.getQuantity(vector<int>)); auction.Price(trader.getPrice(vector<int>)); auction.Type(trader.getType(vector<char>)); auction.showbid(); auction.matchBids(); }; [/code] In these lines: [code] …

Member Avatar for Roses89
0
52
Member Avatar for spryor

Hello, This summer I am looking into doing some research to enhance my undergraduate resume for graduate schools. The research that I am looking into requires that I have the ability to access and manipulate sound files (specifically music) so that I can perform statistical, machine learning and categorization algorithms …

1
20
Member Avatar for KBL

This is a small program that is suppose to find out the sum of even numbers entered into an array.... but everything works fine without errors but the output am getting is a negative number.... -1717986920. [CODE]#include <iostream.h> void main() { int sum=0; int i, a[6]; int range; cout<<"Enter a …

Member Avatar for KBL
0
11K
Member Avatar for triumphost

Ok here is what I want... I want to read the Dictionary file, and output its contents into the dynamic-text.dat file... But it reads the dictionary file and it will not write to the dynamic-text.dat file and I have no clue why... what am i doing wrong.. when I split …

Member Avatar for triumphost
0
339
Member Avatar for prototyppe

Hello, I cannot figure out why my program crashes when it gets to the code below. Everything else in my coding works, except when I go to run this code... [code] void Auctioneer::matchingGame(){ vector<Trader>::iterator it; int i=ask.size()-1; int x=0; int y=0; int bId; int tId; char h; int temp=0; int …

Member Avatar for prototyppe
0
132
Member Avatar for 3cats

Assignment - read an input file that has month, highest temp for month and lowest temp for month. I have to use a function called GetData to fill the array. I define the array as 12 rows and 3 columns. Please could someone look at the code I have and …

Member Avatar for jonsca
0
189
Member Avatar for daino

Hi Would anybody be able to tell me if there is a book or any material ot there explaining what kind of widgets you can get for C++. I'm not sure what kind of widgets are available in terms of functionality. When I say types I mean say textbox or …

Member Avatar for daino
0
161
Member Avatar for jelinky

hey guys, this is what i have so far... this part is from the main.cpp [CODE]double x; cout<<"Enter a number to search for: \n"; cin>>x; list.search(x); if (list.search(x)) cout << "\n" << x << " IS on the list! AT POSITION :" <<endl; else cout << "\n" << x << …

Member Avatar for jelinky
0
111
Member Avatar for leesho

i have this code and for an class work task and you have to do a walkthrough table and work out the output. But i dont know how you do a walkthrough table. Can someone help? [CODE] int c = 0, sum = 0; while (sum < 8) { c++; …

Member Avatar for leesho
0
1K
Member Avatar for trillionaire

Hi there, I have written a simple program which I know a solution to, I simply don't understand why the version below doesn't work. I have investigated the answer to roughly how it goes wrong, I just don't know why! Where the problems begin is commented in the last six …

Member Avatar for Narue
0
148
Member Avatar for Martje
Member Avatar for Narue
0
35
Member Avatar for brightsolar

Hi everybody have not posted in a while. In all truth i am stuck but very close to finding the collision answer. Note 1 (Most of this skelton was premade for the assignment). Some variables i don;t even know what they do like Vy1. Incx, Incy. Stuff like the file …

Member Avatar for 0x69
0
193
Member Avatar for obeem

Hello guys, I'm trying to get this employee class to work correctly and everything seems to be fine, up until the part comes where it should output all of the information (such as hours worked, hourly pay rate, gross pay, tax amount, and net pay). My program allows me to …

Member Avatar for abhimanipal
0
267
Member Avatar for Martje

I am trying to make a list of array pointers, Is there a way that after declaring an array i can adjust the size? For example at start i create a array called : "list[2]" Is there a way that later on i can change "list[2]" and make it "list[3]" …

Member Avatar for VernonDozier
0
167
Member Avatar for xofth

I have problem in reqruired output [B]the input is[/B] 333-0092-8868389 [B]required output is[/B] Country code is = 0092 City code is = 333 7-digit number is = 8868389 Phone number in correct sequence is = 0092-333-8868389 The full code is [CODE] #include<iostream.h> #include<conio.h> #include<string.h> #include<stdio.h> void main() { [COLOR="Red"]char ch,*str,*country,*city,*digit;[/COLOR] …

Member Avatar for abhimanipal
0
106
Member Avatar for dinesh.isuranga

i'm a C# developer and new to C++. I have to learn about C++ due to my new Project. but no clear idea about Pointers.. therefore if someone who know about Pointers,please teach me them..

Member Avatar for abhimanipal
0
78
Member Avatar for mmgoicochea

So heres a portion of my program... the program has several functions (each doing diff. things) Im having a problem I can not find the way to write the sum of the third row in costOfSports array. the book says something like this: for(col=0;col<5;col++) { for(row=0;row<3;row++) { row_sum[row]=array[row][col]; } } …

Member Avatar for trillionaire
0
113

The End.