49,761 Topics
| |
1>.\speedgame.cpp(10) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body please help! | |
[B]Methods before Members or Members before Methods?[/B] In a header file, which do you define/declare first. Do you list all your variables before the methods (also known as functions), or do you do it the other way around? I always thought that you put the variables first. That was the … | |
Hey peeps, i am just another lost programmer here looking for some good old fashion help, pertaining to a histogram program. If there is anyone out there that can follow me as to what i will me explaining i would like it if u'd step in make a suggestion or … | |
[Code:C++] bool CheckSymmetry(char *File , vector<string>& vertex_set, vector<vector<string>>& edges,vector<string>& char_first) { ............. .......... ........... return true; } Here i m getting the following errors:- error: edges' was not declared in this scope error: `&' cannot appear in a constant-expression error: `>>' should be `> >' within a nested template argument … | |
Hi The following my code snippet [code=c++] void main() { vector<vector<string> > edge_set_test; [B]edge_set_test[0][0]="1"; edge_set_test[0][1]="0";[/B] cout<<"\nTesting values "<<edge_set_test[0][0]<<" "<<edge_set_test[0][1]; } While assiging the values to the vector it throws runtime error what can be the reason for this.. | |
Can anyone please help me here? the IpoptApplication.cpp and .hpp do exist, plus i have specified the ipopt.lib file path in the linker setting of the property page. what is confusing is that, when lapack, asl, hsl and ipopt are compiled, each produces its own 'ipopt.lib' of a different size, … | |
| This is my code below: [code=cplusplus] using namespace std; int main(int argc, char *argv[]) { int thisisanumber; int SecondNumber; int TotalNumber; TotalNumber = thisisanumber + SecondNumber; cout<<"Please enter a number: "; cin>> thisisanumber; cin.ignore(); cout<<"You entered: "<< thisisanumber <<"\n"; cin.get(); cout<<"Please enter a second number: "; cin>> SecondNumber; cin.ignore(); cout<<"Your … |
Hi I have the following code ... main() { .... ... if(var==true) { Graph g1=CreateGraph<Graph>(vertex,edge); } else { Graph1 g1=CreateGraph<Graph1>(vertex,edge); } numvertex(g1); } When i m calling numvertex() function it says undefined identifier g1 what can be the solution for this. Provided I cannot make define the object globally or … | |
Hi Does anybody knows good website with a tutorial for C++. What I really looking for is a tutorial regarding the linked list, stack and queues with a good explanaitions. It would be lovely if anybody knows the site with an practice exercises on them (I mean programs) with an … | |
[B]How do I convert a FILE* to an IStream![/B] Using GDI+, I want to save an HBITMAP to a disk file as JPG. However, I am doing this within a legacy function that provides an already opened FILE* as a parameter. I have found nothing in the docs. [code=c++] static … | |
Hello, I'm trying to make SNAKE (Game) under C++ with using #include <graphics.h> Can anyone help me. Thanks | |
I need to error check a user input and it must be a value between 0 and 13 whole numbers only. it will be stored in a int variable using the cin function. I dont remember how to do this since i have not taken a c++ course in 3 … | |
Hi.. My code is as follows :- [code=c++]class Class1 { }; class class2 { }; main() { .... ..... if(var==true) class1 c1=createandmanipulate(file); else class2 c1=createandmanipulate(file); ...... ..... ..... } [/code] How should i declare the createandmanipulate() function so that it can return the respective object i.e either of Class1 or … | |
Hi all, how to get handle to a window whose name changes dynamically. I have tried using FindWindow() but here it searches for the window name which matches exactly to the string specified. I dont know the class Name for my window, i know only the window name(some part of … | |
i have created a structure and passed the intances of thes structures to the file how can i access each record. either delete or for searching e.t.c......... plz help me in this. | |
Hi, I the below code i could see 2 constructors and 3 destructors being called....i want to know why....can anyone help me in knowing this??? [code=cplusplus] class e { public: e() { cout<<"Contructor\n"; } ~e() { cout<<"Destructor\n"; } void f(e e1) { cout<<"In e\n"; } }; int main(int argc, char* … | |
[code]struct student { char name[20]; int math; int science; int history; int english; int total; } [/code] how to create linked list that sort the details based on total in acsending order and how to prompt tot user to enter the student amount and marks between 0and100 just tell me … | |
I was wondering if anyone knows a good C++ Win32 API Tutorial for someone who knows nothing about gui programming or the windows API. | |
Hey guys, I'm in a bowling league and I need to code a program to help sort/assign points to the scores. I do web design/graphic design so if anybody can help me at all I will be glad to help any of you with any web/graphic needs. Lets say theres … | |
Could someone please give me step by step instructions on how to make gtkmm work with Dev C++ on windows. I've tried following the instructions on the website, but I cant get it to work. Could you please tell me exactly what to download and where to install it. Thanks. | |
Hi, I'm stuck with this one question we were asked to do in class...The program is to read input from a file that contains students' ids and marks and we have to determine their grades and store these variables as arrays then print it out. Then we were to create … | |
Hi all, I've written a configuration file parser, which is just basically gets a bunch of rules, each ended by ';' To get the rules I use a loop: [CODE] ifstream cfgFile; for (int iI = 0; iI < iMAX_MONITORS; iI ++) { ... cfgFile >> someFloat; // test for … | |
here is what I have to create: using while, for, do...while Write a program that displays a menu with the following choices to the user. A - Find the largest # with a known quantity of numbers B - Find the smallest # with an unknown quantity of numbers C … | |
[CODE=CPP]#include<iostream.h> #include<conio.h> class student { public: int rno; public: void get() { cout<<"\n\nEnter the Roll No:"; cin>>rno; } }; class test1 : public virtual student { protected: float score1; public: void get1() { cout<<"\n\n1st test score of "<<rno<<" is :"; cin>>score1; } }; class test2 : public virtual student { … | |
[code=cplusplus] void * operator new( unsigned int iSize ) { static unsigned char aMemPool[10000]; static unsigned iUsed = 0; iUsed += iSize; if( iUsed > 10000 ) { return 0; } return &aMemPool[iUsed-iSize]; } void MEM_UnitTest() { for( int i = 0; i < 100000; i++ ) { int *piTest … | |
[code=c] extern CGameEngine *g_psEngine; // assume g_psEngine is always valid. #if !defined(BUILD_RELEASE) #define Debug(A) g_psEngine->DebugPrint(A); #else #define Debug(A) #endif if(!a)Debug(“Player Not Found”) ControlPlayer(); [/code] | |
Hi i am new to Programming C++ in Visual C++, can anyone plz help me with the concept of UNICODE Programming in VC++, can anyone suggest me some good tutorial on this topic?? I am confused about _TCHAR etc stuff!!! | |
I really really need the source code for SUDOKU puzzle solving in C/C++.Pls do help me by sending it to <email snipped> | |
Since i am going to have to learn Smalltalk well enough to convert it to .NET ( or so i have been told ) i decided to convert some of the C++ tutorials to Smalltalk. Namely this one: Write a program which performs addition, subtraction, multiplication of matrices. The dimensions … | |
Hi! I'm having a proble with constructors. I'm supposed to write a program that has a default constructor, but also one that takes parameters. The program I wrote below is desigend to allow teh setting of age of the person, but when I compile it, I get a message saying … |
The End.