49,761 Topics
| |
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 … | |
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] | |
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 … | |
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 … | |
[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; … | |
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] | |
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 … | |
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 … | |
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) … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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. | |
hi... could anyone please help me with how to create buttons dynamically in vc++ 6.0 dailog based application | |
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 … | |
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; … | |
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 … | |
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 … | |
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! :) | |
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. | |
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] … | |
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. | |
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, … | |
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? |
The End.