49,761 Topics
| |
i need to create 100 nodes link list and by using it as a memory, Implement a mechanism to add two large numbers (in the order of 1 x 108) using only stacks. Implement the selection sort algorithm on top of the simulated memory codes must be in c++ | |
Okay, I have absolutely no idea what is wrong with this code. When I comment out the parameters of the functions, everything works fine. Just like last time, it may be something obvious, I don't see it, though. [CODE] #include <SDL/SDL.h> #include <iostream> class tnt_Player { private: SDL_Surface *Sprite; int … | |
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 … | |
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*` | |
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 … | |
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 … | |
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 … | |
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: … | |
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 … | |
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 { … | |
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 … | |
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. … | |
[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; … | |
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 … | |
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 … | |
| 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? |
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! | |
can somebody explain the mechanism of the keyword "malloc"(allocating memory) in C++ by using a simple program code.........? | |
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 … | |
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, … | |
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 … | |
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 … | |
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 | |
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] … | |
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 … | |
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; … | |
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 … | |
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 … | |
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 … |
The End.