49,761 Topics

Member Avatar for
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
299
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
110
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
117
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
387
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
126
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
94
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
222
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
144
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
176
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
276
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
137
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
110
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
162
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
151
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
234
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
127
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
144
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
190
Member Avatar for gfp91

hi. im programming a 2d game and on the university computers it runs nice and slow but on my i7 laptop the ball travels at a million miles per hour. how can i restrict the speed/fps.

Member Avatar for gfp91
0
117
Member Avatar for dan_code_guru

Ive been trying to code a GUI application in qt but im having trouble trying to get a button work. homewindow.h: [CODE]#ifndef HOMEWINDOW_H #define HOMEWINDOW_H #include <QWidget> class homeWindow : public QWidget { Q_OBJECT public: homeWindow(); ~homeWindow(); void init(); private slots: int when(); private: QWidget *aWidget; }; #endif // HOMEWINDOW_H[/CODE] …

Member Avatar for chikkupa
0
156
Member Avatar for ponnds

i am new to linux ,i am using eclipse IDE for my developing ,by means i only creating tar,or tra.gz,i need the rpm packages, if any tools is available for creating rpm packages in linux.

Member Avatar for L7Sqr
0
70
Member Avatar for sushlet

Requesting help with my homework problem. error: conversion from 'std::string*' to non-scalar type 'std::string' requested The lines with the error are under the comments. Thanks. [CODE] #include <QtCore/QCoreApplication> #include <iostream> #include <cstdlib> #include <string> using namespace std; typedef string* stringPtr; string* addEntry(string *dynamicArray, int &size, string newEntry); string* deleteEntry(string *dynamicArray, …

Member Avatar for sushlet
0
5K
Member Avatar for the_kitoper

When I move my gtk window it freezes, it runs a timeout and I believe this may be the problem. May anyone provide further explanation on this subject?

0
107

The End.