51,593 Topics
![]() | |
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 … | |
![]() | [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 = … ![]() |
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 … | |
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 . | |
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 … | |
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 … | |
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 { … | |
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 … | |
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 … | |
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 … | |
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:) | |
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 … | |
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. … | |
can you help me guys about how to create program that can compute prelim,midterm/prefinal,finals thanks | |
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. | |
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 … | |
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? … | |
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 … | |
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 … | |
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]; … | |
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 … | |
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:( … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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] … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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 … ![]() | |
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, … | |
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 =) | |
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 … |
The End.