49,766 Topics

Member Avatar for
Member Avatar for DazedanConfused

Hello forum, I need help with my first assignment regarding classes. I have no clue where to start so if possible could you please walk me through the best logical process to solve this assignment. I have no clue where to start so any information will help. Here is what …

Member Avatar for Zvjezdan23
0
346
Member Avatar for gdubz

Im trying to take input data from a user as a string of number or letters and store each char on a different array, whats the proper syntax fro this?

Member Avatar for Zvjezdan23
0
225
Member Avatar for cangan

Hi people, I need to change return type of a function. So function should return array values.In here, data type of the array values are not int,char or double. The data type of the array values are a kind of custom type. So confused. Please help:scared::idea::( [CODE] [COLOR="Red"]void [/COLOR]DataType_Class::insert_rowData_into_array() { …

Member Avatar for cangan
0
257
Member Avatar for BobFX

I need to override the Close button an a C++/CLI Form application, allowing the user to cancel the close. This must have been asked a zillion times, but I can't find an example specific to C++/CLI Form applications. My Form class starts with: [code]namespace TR31Forms { using namespace System; using …

Member Avatar for AmrFouad
0
2K
Member Avatar for VernonDozier

I have a base class and a derived class. The base class has an int called a that needs to be initialized. I want to create an instance of the derived class, so I call its constructor and pass it an int. I want that to call the base's constructor …

Member Avatar for VernonDozier
0
118
Member Avatar for Allander

I'm trying to pass a list from a function to another using templates but get this error message: [QUOTE]/home/mattias/CodeBlocks/SpelBeta/src/player.cpp|64|undefined reference to `void Ground::bulletsCollition<Bullet>(std::list<Bullet, std::allocator<Bullet> >)'|[/QUOTE] Here is the code: [CODE] //In the function calling the template function (*blocks).bulletsCollition(player_bullets.getList()); //In header that the getList is declared #ifndef BULLETLIST_H #define BULLETLIST_H #include …

Member Avatar for mike_2000_17
0
11K
Member Avatar for cangan

Hi all, I just need the array type of Person object. So it will be an array object. Please some help. [CODE] void SomeOtherFunction() { MyDataType ^Person = gcnew MyDataType(); // simple Person object (C++/CLI) } [/CODE]

Member Avatar for cangan
0
325
Member Avatar for lxXTaCoXxl

I recently obtained an HP Touchpad 32 GB, and I'm wanting to develop applications for it. I'm currently downloading the webOS SDK/PDK installer, and have finished downloading Virtual Box. I have the latest version of Java installed as well. What I'm wanting to know, is that I've read that we …

Member Avatar for lxXTaCoXxl
0
112
Member Avatar for Despairy

i tested the following code as my teacher told me but it wont do what i want it to [CODE] vector<GameObjects*> blockers; blockers.push_back(new Wall(pictures,i,j)); vector<GameObjects*>::iterator k = blockers.begin(); for(;k != blockers.end(); k++){ cout << typeid(**k).name() << endl; } [/CODE] what i want to get is "Class Wall" but i only …

Member Avatar for Despairy
0
119
Member Avatar for MrsHeard

[CODE]#include <iostream> #include <cmath> #include <iomanip> using namespace std; int triangleType(double x1, double y1, double x2, double y2, double x3, double y3); double distance(double a1, double b1, double a2, double b2); int main() { double x1, y1, x2, y2, x3, y3; cout << "Enter vertices for the triangle." << endl; …

Member Avatar for MrsHeard
0
392
Member Avatar for subbudaita

Hi! "OBJECT is an instance of a class" then where is the object in the following code please........ [CODE]class A { int a; int b; public: void display() { cout<<"where is the object?"; };[/CODE]

Member Avatar for tomtetlaw
0
128
Member Avatar for triumphost

How can I detect 3D Images? These images rotate in every direction in a game and I want to be able to detect them and click the right ones. Where would I start? I was thinking just loading a lot of bitmaps and somehow making a 3D image of it …

Member Avatar for Labdabeta
0
95
Member Avatar for sinatra87

I've search the forums here and found a few other people with the same problem I have, but I'm not sure I understand the solutions that have been presented. I have a simple geometry calculator I'm working on as C++ practice. My program displays a menu and asks for the …

Member Avatar for sinatra87
0
223
Member Avatar for hondros

Essentially, I'm learning how emulators work. I've got the core down, but I wanted to know if I'm actually doing this the right way, or if I should be doing it differently. [CODE]#include <stdio.h> // Opcode + Argument Retriever #define GetOpCodeControl1(x) (x>>14) #define GetOpCodeControl2(x) ((x>>12)&0x3) #define GetOpCode0Arg(x) (x&0x0FFF) #define GetOpCode1Arg(x) …

Member Avatar for hondros
0
151
Member Avatar for vlaskiz

Basically I dont even know if I named the thread properly but lets get on the story. I've got a list of wares (in text file) with its name, date it was brought to store, date it was sold, amount and price. [CODE]Pigema //name date it was brought sold amount …

Member Avatar for Ancient Dragon
0
178
Member Avatar for stereomatching

compiler : visual c++ 2005 os : win7 64bits The more I study about our source codes, the more dense fogs surround my head. According to what I know, memset can't be used to initialize POD This is the snippet of our codes(The problem of encapsulation? there are too many …

Member Avatar for mike_2000_17
0
2K
Member Avatar for cangan

Hi gang, I've created an object array from a managed class. [CODE] array<MyDataType_Class^> ^Object = gcnew array <MyDataType_Class^> (3); Object[1] = gcnew MyDataType_Class; Object[1]->id = 1; Object[1]->surnmame = "Formen"; TextBox1->AppendText(ConvertToString(Object[1]->surname)); // Outputs "Formen" + [/CODE] The object works well and outputs expected results. However what i need is : [U]Calling …

Member Avatar for cangan
0
279
Member Avatar for pilipino93

HI, I've been looking for a long time now, for some simple ways to get the full path of a file in the same directory of my console and the console itself. The main purpose of my small project is to just locate a file and move it into another …

Member Avatar for pilipino93
0
1K
Member Avatar for cangan

Hi all, I've created an object array from a managed class. [CODE] array<MyDataType_Class^> ^Object = gcnew array <MyDataType_Class^> (3); Object[1] = gcnew MyDataType_Class; Object[1]->id = 1; Object[1]->surnmame = "Foo"; TextBox1->AppendText(ConvertToString(Object[1]->surname)); // Outputs "Foo" [/CODE] The object works well and outputs expected results. However what i need is : [U]Calling or …

Member Avatar for zeroliken
0
157
Member Avatar for hamby

Hi i'm making a function that will return make a series of strings and perform a function returning a value for each. I've stored the strings in one vector v, and the integer values in another v2. Then it is supposed to return the string that corresponds to the smallest …

Member Avatar for hamby
0
7K
Member Avatar for Zssffssz

When trying to cut down possible memory leaks in my program, I noticed a reoccoring pattern: Move Delete closer to new, repeat, remOve the function that uses it and move code to main, move a few things to global, replace some stuff with arguments and return values, and in the …

Member Avatar for MastAvalons
0
139
Member Avatar for Karlwakim

hi everybody, i am using code blocks with the mingw compiler to develop my c++ console applications, in the end of each program, i get the message "Process returned 0 (0x0). execution time : ....... press any key to continue" How can i get rid of that. Thanks

Member Avatar for Narue
0
111
Member Avatar for Labdabeta

I have a difficult function to write and I have no idea where to begin. Here is the definition of what I need to write: "A function f(x,y) which returns true if the binary number formed by concatenating the bits of x, 8*y-1 zeroes and a one is prime, false …

0
110
Member Avatar for jryans10

Hi, If you create a CLR windows form project in Visual Studio C++, when you distribute your programs does the user need the .NET Framework or just the Visual C++ 2010 Runtime Redist? Thanks.

Member Avatar for stbuchok
0
163
Member Avatar for jaai

hi... could anyone please help me with how to create buttons dynamically in vc++ 6.0 dailog based application

Member Avatar for Ancient Dragon
0
152
Member Avatar for pseudorandom21

Is there a library that's easy to setup and use with Visual Studio 2010 for AES encryption/decryption? I've been fiddling with CryptoPP and it's endless link errors and iterator_level_not_equal error messages for an hour now, so I think it's time to look for an installer or a new lib. Any …

Member Avatar for Narue
0
237
Member Avatar for jryans10

Hi, I'm just wondering, why do we bother with function prototypes? Wouldn't it be better if we just defined the functions before the main function instead of having a function prototype and a function definition in separate areas? For example, instead of the following: [CODE] #include <iostream> using namespace std; …

Member Avatar for jryans10
0
128
Member Avatar for jryans10

Hi, Can someone please help me with understanding the differences between the 2 please: [CODE] Shape* rectangle = new Shape; [/CODE] And [CODE] Shape rectangle; [/CODE] I know that with the pointer you use the "->" operator to access the object methods, and with the other one you use the …

Member Avatar for Narue
0
145
Member Avatar for MrEARTHSHAcKER

Hi, Is there any way to add specific location for images in Borland C++ Builder? For example, I have background image, but I want it to be in root folder, together with exe file (reason: I want to make it accessible for users, who has no access to the source …

0
61
Member Avatar for MrEARTHSHAcKER

Hi, I made code of several classes for game, not 3D nor 2D, it's like those on FaceBook where buttons are main. I'm curious, could code for that type of game be called Game Engine? Hmm... Thanks! :)

Member Avatar for MrEARTHSHAcKER
0
192

The End.