49,761 Topics

Member Avatar for
Member Avatar for dgreene1210

I am only a very beginner and was wondering if anyone can give me some help in determining how to fix the error messages i keep getting when i try to compile. I have been pulling my hair out for 3 days. Any help is much appreciated! attached is the …

Member Avatar for raptr_dflo
0
169
Member Avatar for gil_mo

Hi, Absolute newbie to cryptography. I'm looking for C++ open source code (to be compiled on Windows, Mac, linux), for doing the following: 1. Generate private+public keys (need not run on all platforms). 2. (server side) Adding a digital signature to an XML document using a private key. 3. (client …

Member Avatar for raptr_dflo
0
275
Member Avatar for localp

I am using Visual Studio 2008. I created a windows Console project and wrote my code. it compiled well and the program created a default .exe file. Now i created another project. this time its a C# project, and i am trying to access the functionality from the C++ project …

Member Avatar for raptr_dflo
0
161
Member Avatar for racumin

Hi I am implementing a "Star Craft" game and I have troubles on my A* algorithm. I followed the steps in [URL="http://www.policyalmanac.org/games/aStarTutorial.htm"]here[/URL] and created my own implementation using object oriented c++. Now when I have say 32 x 32 grid, and I need to move 1 unit, it takes for …

Member Avatar for mehdi_gol
0
486
Member Avatar for learningcpp

Hi All, Can you please help me to understand why the following code is behaving this way? I think both outputs should be 1 ( 1 means const T), but its not!! [CODE] template <typename T> struct IsConst{ enum {isConst = 0}; }; template <typename T> struct IsConst<const T>{ enum …

Member Avatar for learningcpp
1
3K
Member Avatar for yobbko
Member Avatar for mahmoz

heeey guys i want to make predator and pray simulation and i made the 2d array i just don't know what to do next i need help !!!!:S [CODE]#include <iostream> using namespace std; void printGrid(char grid[][20], int w, int h); int main() { // Create a 20 by 20 grid …

Member Avatar for raptr_dflo
0
270
Member Avatar for massivefermion

I wanted to have a vector<string> and a vector<double> in my class so I used forward declarations below: [CODE=c++] class string; template <typename T> class vector; [/CODE] But I recieve the error: [ICODE]field 'varname' has incomplete type[/ICODE] for both vector<string> and vector<double> variables. I searched internet for this error but …

Member Avatar for raptr_dflo
0
2K
Member Avatar for infiniteloop56

Hey guys I have a program im doing for fun, I need to be able to enter a minimum exponent and a maximum exponent as well as a base. CANNOT USE THE POW() FUNCTION. Ex. minimum exponent = -2 maximum exponent = 3 base = 2 output: base exponent result …

Member Avatar for raptr_dflo
0
232
Member Avatar for Ninjah

Good Afternoon, I am working on a project in which I would need to create a matrix of nxm dimensions, in which the top, bottom, left and right edges should have the value 1 and the interior of the matrix should be a random between 0 and 1 with a …

Member Avatar for Ninjah
0
207
Member Avatar for Labdabeta

Code::Blocks isn't working. I recently reinstalled to get a newer version and when I hit build I get the following error: [CODE]mingw32-g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c D:\Programming\C++\TESTINGOPENGL\main.cpp -o obj\Debug\main.o Execution of 'mingw32-g++.exe -Wall -g -I"C:\Program Files\CodeBlocks\MinGW\include" -c D:\Programming\C++\TESTINGOPENGL\main.cpp -o obj\Debug\main.o' in 'D:\Programming\C++\TESTINGOPENGL' failed.[/CODE] Please help!

Member Avatar for Labdabeta
0
2K
Member Avatar for montjoile

I'm getting a runtime error, and I can't figure out why. I'm developing the insert method of a btree. Below is the code of insert() [CODE] void insertar(btree* r, int dato){ int pos=0; btree* encontrado= buscar(&*r, dato, 0); //buscar() searches if [COLOR="Red"]dato[/COLOR] already exists if (encontrado==NULL) printf(" data already exists"); …

Member Avatar for gusano79
0
137
Member Avatar for The_Prince

Hello everybody. Just a query (in fact two) I have a reasonably huge matrix type data which is to be used via some other calculations, In the matrix are values of 1s, 0s and -1s which will appear in random and the actual i-jth position is important. Is it any …

Member Avatar for mrnutty
0
171
Member Avatar for tennis

[CODE]#include "stdafx.h" #include<iostream> using namespace std; class A { public: A(){} void setdata(int s) {t=s;} int getdata(){return t;} protected: int t; }; class B: public A { public: B(){} }; void main() { A a; a.setdata(3); B b; cout<<b.getdata(); }[/CODE] Why I cannot get an output of 3 here? Can …

Member Avatar for Narue
0
101
Member Avatar for mirkuh

Hi, in my code the class CFactory has a non-type template parameter TStaticMemberFct which is a static function of a different class that should get called when Wrapper() is called via a CInterruptDelegate object. But it seems that Wrapper() gets already called when it is passed as the CInterruptDelegate constructor …

Member Avatar for Narue
0
112
Member Avatar for leetari

Hi, Why is it that when I remove(commented out) the inner j for loop and all it's contents, the cmd prints out my desired output. However, replacing back the inner for loop, it gives an incorrect output -> my counter values are wrong when printed. Can anyone spot what I …

Member Avatar for leetari
0
154
Member Avatar for yashsaxena

Hello All Recently I go through the concept of virtual function in C++. I have confusion with how many vitual pointer and virtual table for a single class are created? And if the class is inheriing some other then what will be the situation?

Member Avatar for yashsaxena
0
209
Member Avatar for jbennet

Ok, in a very simplified version ive got to write a C++ app to interface with a joystick and play various sounds depending on its position - Its a USB joystick and I will have a QT GUI. This app already exists, for Windows/C# . I just need help porting …

Member Avatar for jbennet
0
342
Member Avatar for dev344

Hi I have never come across such code before. I can't make out what it is [CODE]SockerManager::SocketManager() : sockets(0), events(0), nSockets(0) {}[/CODE] Could someone tell me what does something like a() : b() mean? Thanks Devesh

Member Avatar for dev344
0
143
Member Avatar for laim

Hi, I have just started learning classes and I have to make a matrix class. I know matrix math so that is not an issue, basically I have an h and cpp with function names and parameters and just have to define them. My problem is that Im stuck at …

Member Avatar for laim
0
143
Member Avatar for George91340

Hello Everyone! So I have an assignment to create a program to read in data from text file. I managed to get that part, but I'm having trouble with two areas. 1. Having the names read from the display read into a 10x3 format (10 rows, 3 colums/seats.) Expected output: …

Member Avatar for raptr_dflo
0
366
Member Avatar for MareoRaft

I have a Plain Text matrix file (called q.txt): [CODE]1 0 0 0 2 0 0 1 1 0 0 1 1 1 1[/CODE] which I would like to read into a matrix, which is a vector containing vectors (which contain doubles). My current codes yields the error "newReader.cpp:22: error: …

Member Avatar for MareoRaft
0
1K
Member Avatar for VernonDozier

[code] #include <stdio.h> #if 1 //! Set Pin string const char* const ONCLI_SET_PIN_CMD_STR = "set pin"; #endif const char* const SINGLE_APP_STRINGS[] = { ONCLI_SET_PIN_CMD_STR }; int main() { printf("%s\n", SINGLE_APP_STRINGS[0]); getchar(); // pause return 0; } [/code] Line 12 Error message... [code=text] 12|error: initializer element is not constant 12|error: (near …

Member Avatar for VernonDozier
0
329
Member Avatar for marrkee

hello, I'm currently writing a program to write a website easier, but i don't know, how output " to a file? thank you very much for help

Member Avatar for marrkee
0
112
Member Avatar for Jsplinter

Is there a more efficient way to do this? [CODE] vector<int> myvec; vector<int>::iterator it; /////// // Count # of iterations int i = 0; while ( it != myvec.end() ) { ++it; ++i; } [/CODE] Just seems expensive to me.

Member Avatar for Narue
0
115
Member Avatar for leetari

hi all, I have this minor problem which is making me go cranky at the mo.. Can't think straight, need some insights to what I can do... Below is the code which I am working on which takes the test sample values stored in my test 2D array subtracts the …

Member Avatar for leetari
0
158
Member Avatar for xpartmgr

OK, so I already program is C#, but I am taking a C++ class. I want to create a windows forms application and have other classmates create some classes that we can all put into the windows forms application to create a final project. Well the entire book only takes …

Member Avatar for xpartmgr
0
84
Member Avatar for infiniteloop56

Hi I have a problem with some code. Basically what the program is supposed to do is to take in a minimum exponent and a maximum exponent and a base. Then its is suppose to create a table displaying the base to the power of the minimum exponent to the …

Member Avatar for invisal
0
201
Member Avatar for Elghrib
Member Avatar for thecoolman5
-1
37
Member Avatar for yoni0505

Hi I have a problem with a code I made, some save editor for some game. The code suppose to write 2 bytes to a specific offset in some file. The file's short integers are saved as little endian. everything works fine, but when one of the integers equal 10, …

Member Avatar for yoni0505
0
204

The End.