49,760 Topics

Member Avatar for
Member Avatar for jimJohnson

Can someone take a look and let me know if this is right... I need to add a method/function to output a linked list in reverse order. I need to use either the header and source files for the dynamic list class. I cannot reset links or alter the original …

Member Avatar for NathanOliver
0
73
Member Avatar for tomtetlaw

How do I call a pointer to a member function? doing it like this gives the error 'term does not evaluate to a function taking 1 argument' ent->GetInputs()[i]->function(i); where function is of the type void (__thiscall CBaseEntity::* inputfunc_t)(inputdata_t *data) and ent is of type `CBaseEntity*`

Member Avatar for NathanOliver
0
124
Member Avatar for CarleneGriffith

I have written my code for my class and i keep getting a couple of errors. Could someone take a look for me and point me in the right direction. Here is my code: // DateProject.cpp : Defines the entry point for the console application. // /*specification: Create a date …

Member Avatar for CarleneGriffith
0
137
Member Avatar for foco

I am trying to compile code that will perform an http POST using the GNU c++ compiler, and I get the following error: http_post2.cpp:93: error: ‘strlen’ was not declared in this scope The line that it points to is simply: [CODE]SEND_RQ("POST ");[/CODE] I went up to see where SEND_RQ is …

Member Avatar for foco
0
108
Member Avatar for phohammer

Hello everyone, I'm attempting to write a program for an assignment dealing with a class in C++. As you may have guessed, classes are new to me. And it seems as though that is what is giving me these errors: [QUOTE]1>c:...main.cpp(90) : error C2228: left of '.number' must have class/struct/union …

Member Avatar for phohammer
0
164
Member Avatar for shiftingspanner

I'm teaching myself C++/CLR using Visual C++ 2008 (I'm so new I'm not too sure how even to phrase that all) and just as soon as I think I understand something it turns around and bites me. I have a class that looks like this: [CODE]public ref class TABLE_KeyData{ public: …

Member Avatar for shiftingspanner
0
175
Member Avatar for drt_t1gg3r

I am having a problem copying data members from an inherited class to the base class. All of the data is copied except the container data. [CODE] #ifndef NPC_H #define NPC_H /* * Basic parent to all other NPC types. * NOTICE: player is considered an NPC type */ enum …

Member Avatar for ifezuec
0
206
Member Avatar for ifezuec
Member Avatar for NP-complete
0
69
Member Avatar for earlyriser

Hello. I have some troubles with a constructor, I can't figure out why a WHILE isn't working as I expected. The program stops there and it doesn't continue. Thanks in advance. [code]// reading a text file #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; struct Cours { …

Member Avatar for ifezuec
0
329
Member Avatar for ahaykal

Hello members, Well I am always facing trouble with operator overloading. I just have this Assignment in which when I reached operator overloading nothing worked. I tried to do it in many ways but couldnt. Could someone help with this issue please! the question asks to include d) An overloaded …

Member Avatar for nbaztec
0
176
Member Avatar for jasweb2002

Hey everyone, This is my first time here just to let ya know. Hopefully you can help me. :D The language is C++. I am currently working on a file that consists of functions to manipulate doubly linked lists from the main program. After writing several function everything was fine. …

Member Avatar for Jean <Brasil>
0
392
Member Avatar for Shaida

[B]I've written a code but it doesn't run! I can't find the problem and the Error is : Declaration Syntax Error will anyone help me?! :)[/B] [CODE] #include<iostream.h> void hi(void); void name(void); int main() { int m; cout<<"Enter one of numbers below:\n"<<"1.Hi\n"<<"2.Name:"; cin>>m; switch (m) { case 1: hi(); break; …

Member Avatar for Shaida
0
2K
Member Avatar for pato wlmc

Well, first of all i already know some things about c++ programming, but i'm really aiming to video game programming. Until today, i used to compile my codes on WxDevC++, but isn't really that good, and people keeps telling me that Microsoft visual studio is good for game developing. But …

Member Avatar for thelamb
0
224
Member Avatar for tomtetlaw

I am using the Win32 API. How would I be able to check if the shift key is being held down when processing use input? I know that value is MOD_SHIFT but I don't know if it's lParam or wParam of WindowProc that will hold this, of if it's any …

Member Avatar for mitrmkar
0
162
Member Avatar for Chris11246

I just downloaded visual studio c++ 2010 express and when I tried to debug my code it doesn't seem to create an executable file. Is there some setting that I have to change?

Member Avatar for Chris11246
0
118
Member Avatar for Alex_

Can someone explain it to me simple what it is? I read quite a lot of articles but don't understand how to make one. Are there some rules to apply, or is it just a mental programming technique? Please and thanks in advance!

Member Avatar for mrnutty
0
102
Member Avatar for madonline

can somebody explain the mechanism of the keyword "malloc"(allocating memory) in C++ by using a simple program code.........?

Member Avatar for madonline
0
119
Member Avatar for Dyed Purple

I'm currently trying to create a program which factorises a number entered by the user, as reccomended by the sticky. When I run the program, I get "error C2061: syntax error : identifier 'cin'". Here is my code: [code] #include <iostream> using namespace std; int main() { int iFigure; int …

Member Avatar for thelamb
0
224
Member Avatar for Prota

Hi! I am doing a project that's about inheritance and I've solved the most of it. I have some problems with removing a vehicle (car or motorcycle) because they have different characteristics. A car has these characteristics: brand, age, regNr, price, fuel, size A motorcycle has these characteristics: brand, age, …

Member Avatar for Prota
0
106
Member Avatar for ferenczi

Hello, (this is not a homework). So, I've created a graph as adjacency lists: [CODE] class Edge; class Vertex { public: Vertex* vNext; Edge* adjList; char FirstElement; bool marked; Vertex(char a) : FirstElement(a), vNext(NULL), adjList(NULL), marked(false) { } }; class Edge { public: Edge* eNext; int weight; char SecondElement; bool …

Member Avatar for daviddoria
0
374
Member Avatar for SweetDeath

Hello there, so i have this current project for school and i`m kinda stuck the program i`m suppose to write is this : __________________________________________________ ____ Each year many tourist visit our country please write a program that collect the following information: Name(first,middle,last) sex country age profession Also the program shoud …

Member Avatar for SweetDeath
0
111
Member Avatar for Bukhari1986

Hi I need code of how to copy part of string. like 0092-333-1234567 so i need to copy the part 333 or 1234567 in to a new string variable sample inputs 0092-1234567-333 333-0092-1234567 NOTE: poiters can also be used i need it in Turbo C++ or Dev C++ Thanks

Member Avatar for Bukhari1986
-2
133
Member Avatar for Veli Atci

Hi, I am having "Out Of Memory" problem with my program.I am using Borland C++ 5.0. I have an MySQL type database and trying to access one of its tables.The table which I am trying to access (activate) is around 450 Mbyte.Here is my sample code which gives error: [code] …

Member Avatar for Gandharv04
0
223
Member Avatar for jimJohnson

I have one additional problem can someone tell me if I did this one right and I should be done... The worst case number of comparisons in searching a bst is equal to its height - the number of levels in a tree. Write a recursive member function height() for …

Member Avatar for griswolf
0
97
Member Avatar for joewinsock

I'm having trouble with this code its part of a birthday profile for class everything else works but this date.cpp file....looked all throughout forms but can't find this particular one..Please help [code] #include "stdafx.h" #include "date.h" #include <string> using std::string; class TestBirthday { public: static void main() { int num; …

Member Avatar for joewinsock
0
110
Member Avatar for perroned

hi im trying to make a tic-tac-toe game in c++ im using a 2-d array of chars to tell if there is an x, 0, or null i wanted to make a procedure i can keep calling every time i need to display the grid however i keep getting this …

Member Avatar for perroned
0
283
Member Avatar for SacredFootball

Hey all! I'm trying to figure out how to check if an element already exists in a vector. EXAMPLE: Elements in the vector are: "Dog", "Cat", "Fish", "Bird" If a user tries to add (case ignored) "Dog", "dog" or any other variation, I want it to spit out and error …

Member Avatar for Narue
0
2K
Member Avatar for amare_de

Hello: Am getting confused about making a 2 dimensional array of pointers allocate storage space dynamically in C++. Actually I just want the second dimension of the array to be dynamic in size. For e.g. a simpler version of what I want to do would be: Instead of, [code=c] int …

Member Avatar for amare_de
0
191
Member Avatar for aaronmk2

The if statment I am using in my main program is not working, it should return the else value, but is returning the information in the if part of the statment and then it causes a run time error. I am not sure what is going wrong. [CODE] que1.add("Fish"); que1.add("Whale"); …

Member Avatar for mbulow
0
135
Member Avatar for bobbyg118

I need some help. I want this program to ask the user how many grades they would like to enter. Than when the user inputs it should ask for the prompt enter your grades as many times as the user wanted. Than assign each letter to the number of grades. …

Member Avatar for mlesniak
0
102

The End.