49,761 Topics

Member Avatar for
Member Avatar for moly

I have two classes; primatives.h [code] class PS2Sprite { public: PS2Sprite::PS2Sprite(); PS2Sprite::PS2Sprite(const float x, const float y); PS2Sprite::~PS2Sprite(); virtual void Render(void) const; virtual void RenderPerspective(void) const; void MoveTo(const float x, const float y, const float z); void Rotate(const float angle); void Rotate(const float angle, const uint8 x, const uint8 y); …

Member Avatar for moly
0
78
Member Avatar for viki0077

What is needed for a C++ member function of a class to behave polymorphic? Please can anyone answer me to this, and if you can give me some example. Thanks.

Member Avatar for NicAx64
0
137
Member Avatar for bailey537

hi i am trying to create a class that contains a struct. This struct inherits properties from other classes. [code] class people { public: struct person:public parent { private: char * data public: setdata(char * x) } [/code] In the parent class i have [code] class parent { private: public: …

Member Avatar for Danny_501
0
56
Member Avatar for talajiam

hi guys, i m new to vc++ and i have a task assigned to use the lzo algorithm in my project so i downloaded its full source code of version 1.08 from the [url]http://www.oberhumer.com/opensource/lzo[/url] now when i m opening its sample.c file (which is a example file in the example …

Member Avatar for talajiam
0
108
Member Avatar for beatlea

Hello, I have a rather complicated pointer/syntax problem. One of my function arguments is a pointer to a structure which contains a void pointer. If I point the pointer to a scalar then in my function I can access it like this: [ICODE] local_var = (appropriate_type *) struc->pointer; [/ICODE] But …

Member Avatar for beatlea
0
107
Member Avatar for mayo88

class Student { private: string studentName; // Would this be initialising a student's name and program code to empty strings.?????? string studentProgramCode; public: /** * Default constructor. * Creates an empty Student object by initialising a student's name and * program code to empty strings. */ Student(); //Default constructor.??? /** …

Member Avatar for jencas
0
87
Member Avatar for t-roy

{I am a newbie to this forum and programing. I am trying to write a program that takes a lists of technical support engineers and move them from the top of the list to the bottom when they get a support call assisted to them. "round robin" A little background …

Member Avatar for ithelp
0
118
Member Avatar for ixuz

Hello there! I'm having problem with my drawing graphics programming, let's say I want to draw a circle. This circle is made out of smaller pieces called pixels. Okay I got a pixelclass containing three values x, y and color. My circle contains a vector which contains all the pixels …

Member Avatar for Duoas
0
190
Member Avatar for johdoe

Greetings, I have the following class [ICODE] class test { public: test():element(NULL), previous(NULL), next(NULL){}; void *element; test *previous, *next; }; [/ICODE] this works fine: [ICODE]test * a_test[/ICODE] but this crashes: [ICODE]test a_test[/ICODE] does anybody know what it is that i am doing wrong? I am sure its something that has …

Member Avatar for johdoe
0
65
Member Avatar for iTsweetie

Hey all, Here I am again, most of my program written but I'm stuck with the last step. The assignment is asking us novice programmers to add three functions (1. to subtract, 2. to multiply, 3. add a function DollarsAndCentsAre which will print out (using cout) the complete value of …

Member Avatar for VernonDozier
0
88
Member Avatar for Argo54325

I've been trying all night to get this to work, but everything i do give me a compile or runtime error. currently I'm using file_size() (no idea what to include inside the brackets). Also if you have can help with any of the following it would help me greatly: -list …

Member Avatar for Argo54325
0
147
Member Avatar for Narue

## Before You Ask ## - Read our [Forum Rules](http://www.daniweb.com/community/rules). - Engage your brain! We understand that running into a problem can turn off the rational centers of the brain, but please sit back and think for a bit about your problem before running off to find help. All too …

Member Avatar for Ancient Dragon
23
7K
Member Avatar for clutchkiller

If I were to work on say an Instant Messenger project, and wrote the gui and event handling using wxWdigets, could I then use the windows API and use winsock to connect the two computers? Basically are API's interchangble in source code?

Member Avatar for Ancient Dragon
0
128
Member Avatar for Klapiii

I'm not good in C++ and I need your help. I have some small program that can automatically play chess in internet chess servers. It needs only the chess engine to play. I play only on [url]www.kurnik.org[/url], but from a few months they changed adress to [url]www.playok.com[/url]. My problem depends …

Member Avatar for Ancient Dragon
0
258
Member Avatar for neox183

I got this assignment and the way it is worded is confusing to me. If anyone can explain it better it would be a great help also how to approach the problem Use a one dimensional array to solve the following problem. Read in 20 numbers, each of which is …

Member Avatar for Ancient Dragon
0
70
Member Avatar for lancevo3

I need to calculate the standard deviation for an array in my program, the array I need to calculate it for is the pgmavg and testavg everything else in my program works correctly. [code=cplusplus] /******************************************************************** CSCI 240 - Assignment 7 - Spring 2009 Progammer: Justin R. Smith Section: 9 TA: …

Member Avatar for Lerner
0
146
Member Avatar for mimis

Hello, I have seen many problems that deals with big integers. I use C++ and it can handle only some digits. Can you help me on how to represent and use them?

Member Avatar for tux4life
0
248
Member Avatar for christiangirl

Hello, I need to make this program sort the numbers entered with merge sort then print them. I am having trouble calling merge sort and getting it to print. Here is the code: [code] #include <iostream> #include "queueLinkedList.cpp" using namespace std; /*struct Item : Data { int value; Item *next; …

Member Avatar for christiangirl
0
196
Member Avatar for christiangirl

Hello, I am having trouble understanding linked lists. I have to make this program that takes input, stores it to a queue, outputs that input, then sorts it using mergesort and outputs it again. It all works except I'm not sure how to call the mergesort classes. Here is the …

Member Avatar for christiangirl
0
231
Member Avatar for 1newguy

[CODE]#include <iostream> using namespace std; bool isVowel(char character); int main() { char character; cout << "Enter a letter, if it is a vowel this program will tell you" << endl; { cin >> character; cout << isVowel(character) << endl; if(isVowel(character)==true) } bool isVowel(char ch) { if('A'==ch||'a'==ch||'E'==ch||'e'==ch||'I'==ch||'i'==ch||'O'==ch||'o'==ch||'U'==ch||'u'==ch) return true; } else …

Member Avatar for Barefootsanders
0
120
Member Avatar for Nikhar

Hi...ok...I want to create a menu which would have 5-6 options. Now, what I want is if the user is at the first option, if he uses the down arrow key, the cursor should move at the next option. I don't want you to write the program for me or …

Member Avatar for vmanes
0
78
Member Avatar for viki0077

I've got these 3 questions, I didn't work so far in C++, and this is preparation for my C++ class, These questions are a little tricky and unknown to me, I tried to find the answers in Wikipedia, but I didn't manage, if anyone can answer me, please. 1.1 Can …

Member Avatar for viki0077
0
128
Member Avatar for perumar

write the definition in c++ for a class named vector2d that stores information about a two-dimensional vector. the class should have functions to get and set the x and y components, where x and y are integers next, overload the * operator so that it returns the dot product of …

Member Avatar for Lerner
0
262
Member Avatar for Lbs Btw.

I have my program...which displays a main menu and gives you four choices, one of which is exit. It is then supposed to move on to the next menu or the part of the program you have chosen, i.e. add temp, delete temp, list temps(this has a serperate menu of …

Member Avatar for vmanes
0
105
Member Avatar for perumar

Write a program that will read in a line of text and output the number of words in the line and the number of occurrences of each letter For example I say hi Output should be 3 words 1 a 1h 2 i 1 s 1 y [code] #include <iostream> …

Member Avatar for jencas
0
83
Member Avatar for awk

Hey everyone, long time lurker first timer poster :icon_cool: For the past week I've been trying to come up with a way of doing this but I just can't seem to think and implement anything that will work. Basicly I have a string such as "Welcome to my program" I …

Member Avatar for awk
0
126
Member Avatar for epan

In a part to one of our assignments we were to use an array (that represents classes) and the user needs to be able to pick..lets say..Classes[3] and get rid of it. But if the array is holding 8 spots, the program needs to be able to pick it out …

Member Avatar for ArkM
0
71
Member Avatar for delifion

Hi, I've got a puzzle game program consist of 2D array 2 rows x 3 cols. The professor wants no changes to be made in puzzle.h, which is: [code=c++] #ifndef _PUZZLE_H #define _PUZZLE_H #include <iostream> #include <iomanip> #include <stdlib.h> using namespace std; // Constants const int COLS = 3; const …

Member Avatar for Gerlan
0
483
Member Avatar for mikey123

In VS9, when i call the GetTickCount() function, it automatically converts it into the GetTickCount64() function upon compilation. This second function only works on Vista+, and thus my program errors when run on XP. I have tried adding the follow in 'targetver.h', but it did not make a difference: [code=c++]#define …

Member Avatar for mikey123
0
109
Member Avatar for tron_thomas

Expectations are this code: [CODE]#include <iostream> #include <limits> #include <stdexcept> using std::clog; namespace{ class FloatValue { public: FloatValue() : m_amount(0.0f) { clog << "Creating default floating point value.\n"; } explicit FloatValue(float amount) : m_amount(amount) { clog << "Creating floating point value with amount " << m_amount << ".\n"; if(std::numeric_limits<float>::infinity() == …

Member Avatar for ArkM
0
154

The End.