49,757 Topics

Member Avatar for
Member Avatar for tonyaim83

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..

Member Avatar for Narue
0
128
Member Avatar for faez

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, …

Member Avatar for faez
0
171
Member Avatar for St!tch

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 …

Member Avatar for Ancient Dragon
0
98
Member Avatar for tonyaim83

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 …

Member Avatar for Narue
0
174
Member Avatar for mauro21pl

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 …

Member Avatar for jbennet
0
85
Member Avatar for dbgarlisch

[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 …

Member Avatar for dbgarlisch
1
215
Member Avatar for daniweb2013

Hello, I'm trying to make SNAKE (Game) under C++ with using #include <graphics.h> Can anyone help me. Thanks

Member Avatar for Narue
0
73
Member Avatar for gmoli

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 …

Member Avatar for Duki
0
113
Member Avatar for tonyaim83

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 …

Member Avatar for vijayan121
0
171
Member Avatar for m_meena

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 …

Member Avatar for vijayan121
0
113
Member Avatar for nagajyothi

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.

Member Avatar for Ancient Dragon
0
89
Member Avatar for rag84dec

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* …

Member Avatar for WolfPack
0
86
Member Avatar for ravindueklum

[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 …

Member Avatar for WolfPack
0
163
Member Avatar for curt22

I was wondering if anyone knows a good C++ Win32 API Tutorial for someone who knows nothing about gui programming or the windows API.

Member Avatar for Ancient Dragon
0
101
Member Avatar for annagraphicart

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 …

Member Avatar for Ancient Dragon
0
87
Member Avatar for curt22

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.

Member Avatar for curt22
0
563
Member Avatar for leetari

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 …

Member Avatar for Salem
0
149
Member Avatar for iaindb

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 …

Member Avatar for iamthwee
1
162
Member Avatar for wicked357

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 …

Member Avatar for Salem
0
104
Member Avatar for mahesh19_19

[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 { …

Member Avatar for mahesh19_19
0
68
Member Avatar for emin3m

[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 …

Member Avatar for vijayan121
0
209
Member Avatar for emin3m

[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]

Member Avatar for Ancient Dragon
0
81
Member Avatar for Ashu@sym

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!!!

Member Avatar for Ashu@sym
0
97
Member Avatar for alagu

I really really need the source code for SUDOKU puzzle solving in C/C++.Pls do help me by sending it to <email snipped>

Member Avatar for Salem
0
47
Member Avatar for Killer_Typo

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 …

Member Avatar for Killer_Typo
0
209
Member Avatar for Granprix

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 …

Member Avatar for Hamrick
0
138
Member Avatar for sasikala123

I am a beginner in programming, I wanted to well verse in basic languages like c & C++. While talking about the theory I can easily understand the concepts, but If I need to write a program with simple concept I am struggling to even think of it. I wanted …

Member Avatar for ~s.o.s~
0
121
Member Avatar for Pretorak

Hello everyone, I don't often use forums for getting answers, but I simply cannot seem to find how to fire a MessageBox under Borland Builder...I could use MessageDlg which works, but I only want an OK button, so I would rather go with MessageBox...code sample: [CODE]void __fastcall TForm1::cmdPlayClick(TObject *Sender) { …

Member Avatar for robgxxx
0
2K
Member Avatar for toolmanx

I have been using the Borland BCC32 compiler and love the CPP32 line numbering tool. Now I want to switch to the cl.exe compiler. Is there a tool like CPP32 in the Microsoft system?

Member Avatar for vijayan121
0
123
Member Avatar for veronicak5678

I am tyring to write a simple program to displa yloan information. Here are my instructions: The monthly payment on a loan may be calculated by the following formula monthly payment=(monthlyrate*(1-monthlyrate)^time/(1+monthlyrate)^time-1)*loanamount Use pow function in your formula To raise a number to the power of another number you will have …

Member Avatar for Salem
0
81

The End.