51,593 Topics

Member Avatar for
Member Avatar for mrnutty

This is a simple demonstration of meta programming. It shows the idea of meta programming. It basically calculates the factorial of a number before runtime. When I first saw the concept of meta programming, it blew my mind so badly. I was so surprised that one could do this. Its …

Member Avatar for griswolf
2
410
Member Avatar for Brian Perrigan

[CODE] #include <iostream> #include <string> #include <sstream> using namespace std ; int main () { char promptisbn [] = "Plese Enter 10 Digit ISBN" ; string isbn ; int x = 0 ; char buffer[1024] ; cout << promptisbn << endl ; cin.getline ( buffer, sizeof(buffer), '\n') ; isbn = …

Member Avatar for Brian Perrigan
0
151
Member Avatar for Agni

Hi, I have always been a little confused about inline/non-inline virtual functions and got a little more confused when I read this in a book: According to the book the code below will fail to link on many systems(it gave no errors on mine, g++ 4.4.1). The explanation is "Even …

Member Avatar for mrnutty
0
653
Member Avatar for rehamz

hi please, i want to write code to draw array of circle on screen but without opengl, and i have problem with graphics.h i don't know who can i use it's function and my compiler can't built it . thanks in advance .

0
77
Member Avatar for insanely_sane

Alright. So I have a Macbook Pro. I also know a bit of c++. I want to know how to draw simple shapes. You know, rectangles, circles and stuff. Like in java (while using console) you can do c.drawRect and stuff? Same way.. is there something or some way to …

Member Avatar for ramox
0
335
Member Avatar for Jackie91

someone help me pls...The 'Add' works fine..but when i try to open it,my full name didn't show completely , such as 'Jack Sparrow' = 'Jack'.. help me pls. #include<fstream> #include<iostream> #include<string> using namespace std; void main() { string name; int age; int options =0; char filename[20]; while (options!=3) { cout …

Member Avatar for Jackie91
0
76
Member Avatar for saransh60

hi i want ask how things get copied when i assign one object s1 to the another object s3(s3=s1)of the same class string in the following given example,also tell why constructor 1 needs to be initialized like str[0]='\o' ..thanks in advance [code]#include<iostream.h> #include<string.h> #include<conio.h> const int max=80; class string { …

Member Avatar for sfuo
0
146
Member Avatar for linziza

Hello Everyone, I am working on this [URL="http://www.ibm.com/developerworks/opensource/library/os-eclipse-stlcdt/#author1"]Eclipse development tutorial from IBM[/URL]. I had already installed Eclipse prior to finding this tutorial and had installed MinGW instead of Cygwin. But other than that change, I followed the "Lottery" programming tutorial precisely until I got stuck at the Running the Program …

Member Avatar for Fbody
0
112
Member Avatar for fenerista

there is a string like [CODE] 0123456789 string a = "25 + 5.6 - (54 - (-61))" a[0] = 2 a[1] = 5 2 = 3 = + 4 = 5 = 5 6 = . 7 = 6 8 = 9 = - 10 = 11 = ( 12 …

Member Avatar for fenerista
0
120
Member Avatar for adaniel058

I would like to create a battleship game in C++. I have the game working but I cant really decide how to determine what positions make up a ship. My game board is a 15 x 15 so, for example: 0000000000000010 0000000000000010 0000000000000010 0000000011000000 0001000000000000 0001000000000000 ect.... So what I …

Member Avatar for Silvershaft
0
177
Member Avatar for help1

GUYS DO YOU KNOW ANY SITE OF FREE Practicing C++ CAUSE I DONT HAVE ANY PROGRAM IN MY COMPUTER AND I NEED TO RUN MY SYNTAX TNKS GUYS BTW IM NEW ABOUT COMPUTER SCINECe TNKS AGAIN:)

Member Avatar for daviddoria
-2
88
Member Avatar for dansnyderECE

I chopped down my make file so I can compile a C++ program with very few, but some flags set to see if I can determine if they are working. The following is my make file section on C++ flags: [CODE]# Common compiler flags CFLAGS = -mips1 -Wa,-non_shared \ -mno-abicalls …

Member Avatar for vijayan121
0
556
Member Avatar for broli100

Hi, I have problem with OpenGl tesselator - the polygon shapes are ok but when I light on polygon then I can see the triangles with another light levels. I know that tesselator draws polygons from triangles but I dont get why I can see that triangles in final stage. …

0
60
Member Avatar for johnariate

can you help me guys about how to create program that can compute prelim,midterm/prefinal,finals thanks

Member Avatar for Nick Evan
0
40
Member Avatar for MxDev

Hi guys, Does anyone here know where I can get C# class library documentation, I've search the interenet but I couldn't get what I need. Any help appreciated. Thanks in advance.

Member Avatar for Teme64
0
175
Member Avatar for Anatake

I have a (I thought:confused:) relatively simple converter project I am writing with Visual Studio 2010 C++ Windows Form App. So to be forthwith I am completely stumped as to how I would get the user input from the Amount box (1234.12 for example) and the Rate box (1.04108 for …

Member Avatar for jonsca
0
226
Member Avatar for usafsatwide

I'm not sure if you all need all my files, but I'm getting the following error message when compiling: productionworker.cpp(8) : error C2440: '=' : cannot convert from 'const char [4]' to 'char' productionworker.cpp(10) : error C2440: '=' : cannot convert from 'const char [6]' to 'char' Can anyone help? …

Member Avatar for usafsatwide
0
265
Member Avatar for maniakdusoleil

So, I'm working on a project for my Intro to Software Development course; it's a sudoku puzzle program. So far, I've encountered two big bugs: 1.) When I wrote the code in Visual C++, the display worked fine(it showed up on the screen as a normal puzzle), but when I …

Member Avatar for StuXYZ
0
2K
Member Avatar for interist

Hello everyone, I'm newbie with c++. I need to ask you probably a very simple question. When I write a file with numbers from an array I then read in a file something like: 7 8 9 10 11 12 When I then read this file and print on screen …

Member Avatar for mrnutty
0
80
Member Avatar for saqib_604

hy! I am writing an integer array class. but there is problem to return array from getter function. any one tell me the procedure of this task. And tell about extract operator for that class.[code]#include<iostream> using namespace std; class integer{ friend ostream& operator<<(ostream& output, const integer& num); private: int array[10]; …

Member Avatar for mrnutty
0
297
Member Avatar for mybluehair

I have a nice c++ program going right now, and I want to create a new feature for my users. The problem is, this new feature would cost me money. So what I would like to do is charge users if they decide to use this feature. I would love …

0
55
Member Avatar for Andreas5

Exercise 12-5 in Accelerated C++. My operator+= works: [CODE]void Str2::operator+=(const Str2& a) { iterator new_data = alloc.allocate((avail - data) + a.size()); iterator new_avail = std::uninitialized_copy(data, avail, new_data); new_avail = std::uninitialized_copy(a.data, a.avail, new_avail); uncreate(); data = new_data; limit = avail = new_avail; }[/CODE] However i cant get the operator+ to work:( …

Member Avatar for Andreas5
0
93
Member Avatar for ttx336

Hello All, this is my first post here, I was a novice Pascal and C programmer back in the DOS days, now I am taking a C++ class based on "Programming - Principles and Practices Using C++" by Bjarne Stroustrup. In the book he gives an example in which he …

Member Avatar for ttx336
0
97
Member Avatar for judithSampathwa

hi there, i have a two forms and in one of the form there is a button to open the other window which is the second form. what i want to do is, when the second form is opened how can i make the first form in a uneditable mode, …

Member Avatar for judithSampathwa
0
113
Member Avatar for NubKnacker

I've been trying to get it to work but it just won't. For some reason everytime I run a program it freezes up my command prompt and I have to close it forcefully. Does anyone know a fix to this? One reason why I absolutely have to use this compiler …

Member Avatar for jemy
0
342
Member Avatar for jackmaverick1

I have been studying c++ on my own for about a year (i'm 11) and have mastered classes, functions, logical operations, and some other basic things. Now I'm interested in learning to make and use GUIs. I already know how to make a message box and have the code but …

Member Avatar for jackmaverick1
0
200
Member Avatar for BobbieJean

Hi, I have to write an airline ticket program for my class. My instructor gave us an example of a similar program so I thought I would build and run it to help me understand it better but he seems to have given us code for a program that doesn't …

Member Avatar for jonsca
0
193
Member Avatar for vinotharan

[CODE]#include <iostream> #include <string> using namespace std; class w { public: void InsertRow(String* myConnection) { // If the connection string is null, use a default. if (myConnection->Equals(S"")) { myConnection = S"DRIVER= {SQL Server};SERVER=MyServer;Trusted_connection=yes;DATABASE=idb;"; } OdbcConnection* myConn = new OdbcConnection(myConnection); String* myInsertQuery = S"INSERT INTO test (id)"; OdbcCommand* myOdbcCommand = new …

Member Avatar for tesuji
0
338
Member Avatar for seanzshow

Hi, I am attempting to come to terms with pointers and have come up against a problem. By my understanding the code below should: a, assign the value 3200 to total. b, attach the memory address of total to ptr. c, send the value at ptr to val. d, display …

Member Avatar for Fbody
0
134
Member Avatar for wwefriend
Member Avatar for Ancient Dragon
0
83
Member Avatar for kiavash2k

Hi, Space Haste II complete sourcecode --------------------------------------------- You can download the game demo and checkout screeshots at gamespot. [URL="http://www.gamespot.com/pc/action/spacehaste2/index.html?tag=result%3Btitle%3B0"]http://www.gamespot.com/pc/action/spacehaste2/index.html?tag=result%3Btitle%3B0[/URL] and here you can download the game complete sourcecode. [URL="http://www.devharbor.com/ms-visual-studio-net/170-space-haste-2-source-code-1.html"]http://www.devharbor.com/ms-visual-studio-net/170-space-haste-2-source-code-1.html[/URL] =================================== Freecraft with sourcecode (similar to warcraft) --------------------------------------------- [URL="http://www.devharbor.com/games/179-freecraft-complete-with-sourcecode-msvc-project--1.html"]http://www.devharbor.com/games/179-freecraft-complete-with-sourcecode-msvc-project--1.html[/URL] Just one thing this website require to register for free to allow …

0
55
Member Avatar for gyan_sachan

Hi all, Using C++ .net I have developed a new Gina.dll to replace the one that windows has in order to add support to Biomatrics under windows NT. At the end of the programming phase i detected that the Logon Scripts were executed,But In login Dialog box last successfully login …

0
40
Member Avatar for thr

hello I want too choose among c++ + qt + php and java for my programming language and platform please help me too choose best platform I want to choose a platform that has this features : speed, portable I am c++ programmer and familiar with java programming language i …

Member Avatar for JamesCherrill
0
172
Member Avatar for angel_banned

Dear all user and admin, My father now is paralyze with a symthom that been called MotorNeoron.. He cant do anything. He just sitting and and laying. Cant move his hand, leg, and all of his part. He ask me to help him making an shortcut key for him.. He …

Member Avatar for jonsca
0
295
Member Avatar for steventaal

OK, so I have this program I am writing called 'GradeBook', and there is a problem that starting on int Menu1(), ' if (menuchc == "4") ', and ending [code=c++] if (menuchc == "y", "Y") { string tmp = "start " + po; system(tmp.c_str()); system("pause"); main(); } [/code] so, I've …

Member Avatar for jonsca
0
123
Member Avatar for wwefriend

hey all,how do i begin to learn a C++, can someone give some guide or idea for me?? thanks..hmm .... i got knowleadge about computer fudamental and basic computer skill

Member Avatar for daviddoria
0
95
Member Avatar for ssuss

hi every body..... ^_^ i have these problem in linked list and i need some one to answer it please..... Develop menu driven C++ program to manage the College of Science Book Store. Your program should maintain three linked lists: one for books, another one for students and a third …

Member Avatar for steventaal
-3
179
Member Avatar for cwarn23

Hi, me again. I don't mean to be a pain but I have another question. I'm trying to add an event handler to the code (Irrlicht game engine) but I can't seem to retrieve data from the main function to the event class. Below I have [ICODE]bool check = ((IGUICheckBox*)event.GUIEvent.Caller)->isChecked();[/ICODE] …

Member Avatar for cwarn23
0
163
Member Avatar for dmane

Dear All, I am developing an app that will hook on to the ExtTextOutW and capture the text to be displayed on the screen and log it to a file. I am doing this on Windows XP and VC++ 2008. I have managed to do the above for a notepad …

0
116
Member Avatar for Michael27

I'm trying to create login form in C#. I store username and password in SqlServer 2008 express using the stored procedure [CODE]ALTER procedure [dbo].[InsertNewUser] ( @UserName varchar(30), @Password varchar(30) ) as If exists(Select 'True' from Users where UserName = @UserName) begin --This means that the user name is taken select …

Member Avatar for arunkumars
0
171
Member Avatar for shayankhan

Hey Guys!!!! I am searching everywhere but i did'nt find actual answer from internet or may b I am wrong.. I am making a program that stores data.. my all program works perfectly but there is one problem i cannot solve.. i am new to WINDOWS FORM (Object ORIENTED) and …

Member Avatar for shayankhan
0
133
Member Avatar for ika_fantasy00

Hi, I just like to know, can an input data from user (keyed in) be compared with data contained in a files (.txt). Because, I need to compare one data (string) to so many strings or a group of data (about 100+). Therefore, I like to avoid from using so …

Member Avatar for ika_fantasy00
0
198
Member Avatar for VBNick

Why does the debugger stop execution and give an error when WaitForSingleObject() is called on a closed HANDLE?? when I run my program outside of the VS2010 IDE, WaitForSingleObject(invalid handle) just returns WAIT_FAILED like its supposed to. Is there anything actually wrong with calling it on an invalid handle?

Member Avatar for VBNick
0
2K
Member Avatar for cwarn23

Hi, long time no C. I have started using the Irrlicht gaming engine but have bumped into a problem which has been bugging me for the past 6 hours flat. I have a variable containing a std::string but it needs to be converted to a (const wchar_t *) string. Does …

Member Avatar for cwarn23
0
119
Member Avatar for technology

Ok Guys I need some help with a small nigglying problem I have traditionally used the following code to check for a keypress when using the console and in msdos thats how far back Ive been using getch() but need to do something similar to this in C++ with cin …

Member Avatar for ShadowScripter
0
197
Member Avatar for VBNick

can anyone tell me why this would freeze? I'm trying to find a way to terminate a thread from outside of it, and allow the main program to do garbage cleanup, like closing any HANDLEs used or freeing any memory allocated. I trigger an event which should cause that loop …

Member Avatar for VBNick
0
102
Member Avatar for angel_banned

Dear Friends, How can we control just for that programme only.. *************************************************** * FOREXAMPLE * *************************************************** * I tried and successfully done with auto clicker * * using Dev C++ on CCleaner. But the question here* * The mouse will keep clicker while Im minimize * * the CCleaner. The …

Member Avatar for iamthwee
0
134
Member Avatar for leeba

I am trying an exercise in a book and can't find my problem. I want an invoice class with a seperate implementation file and a file to use it. Below are the three files. [code] // invoice class //Invoice.h #include <string> using namespace std; class Invoice { public: Invoice(string,string, int, …

Member Avatar for leeba
0
97
Member Avatar for DanielSada

I am a decent programmer in C++ console mode, but when I get to objects I don't know what to focus to learn to program windows in C++. Should i learn GLX or Wx* ??? What are they for? Thanks in advance =)

0
23
Member Avatar for Jennifer84

Hi, I have a form that has Width & Height (1000,1000). Now if the users screen has for example this sizes (800,800). Then I want to adjust the Forms Width & Height to 800,800 so it fits the screen. So my question should be if it is possible to detect …

Member Avatar for ShadowScripter
0
263

The End.