49,755 Topics

Member Avatar for
Member Avatar for ThrasherK

I am trying to finish this hangman game I started. I know how to do everything I have left to do except for one thing. When I run the program and start guessing letters for instance in the word technical, if I guess the letter c, it only puts one …

Member Avatar for VernonDozier
0
226
Member Avatar for Lukezzz

Hi.. I have compiled a project made in Visual C++ Express 2008 Edition and have made a setup.exe of this using the "Inno Setup Compiler". [B](The project needs Framework 3.5 to work.)[/B] I can install this setup.exe fine on Windows XP and run the software. The setup is downloading the …

0
67
Member Avatar for gaurav_13191

I have the following code to find first and second largest elements of an array: [CODE] using namespace std; #include<iostream> #include<conio.h> #include<cstdio> #include<string.h> int* create(int); int maximum(int *,int); int second_max(int *,int); void freememory(int*); int main(void) { int *p,size; cout<<"Enter size of the array:"; cin>>size; p=create(size); cout<<"\nMaximum elemnt in the array …

Member Avatar for gaurav_13191
0
100
Member Avatar for NickDX

Hi, i´ve been studying WinApi for some time now, and have actually managed to create some stuff in c++ with Visual 2010 Express. Now, after creating my Menu, I wanted one of its functions to open a Form i've inserted through "Add New Item -> Windows Form". The problem is, …

Member Avatar for Frederick2
0
186
Member Avatar for Lord_Migit

Hey folks im having some trouble with a roulette wheel selection that im programming for a genetic algorithm. I decided to do it slightly differently to the standard Roulette wheel, primarilty because its highly likley in standard version that the fittest solution will mate with itself. And that just seems …

Member Avatar for vijayan121
0
390
Member Avatar for Garrett2011

suppose we have following function: [CODE]void someFunction(int * araye){ for (int i=0;i<5;i++) cout <<araye[i]<<' '; cout <<'\n'; }[/CODE] can we pass an array to this function by following syntax, under upcoming c++0x standards? : [CODE]someFunction({1,2,3,4,5});[/CODE] if that's true, will we even be able to use this syntax in any case …

Member Avatar for vijayan121
0
258
Member Avatar for PixelExchange

Hello everyone. I have managed to connect a winsock client to a server application; however, I do not know how to display the results that are recieved inside of my "recv" buffer as a unified string, as apposed to the char array format it is currently in. I would like …

Member Avatar for PixelExchange
0
153
Member Avatar for merse

The Developer Studio compiles my code with no error and no warning, but I do not include the needed libraries. Maybe some standard libraries are loaded by default, but I cannot find in the settings, and dont know which ones! Can you help me?

Member Avatar for merse
0
76
Member Avatar for magician89

write aprogram in c++ to read the tokens in one at a time ,if it is integer,push it on stack, if it is binary operator, pop two elements from the stack, apply the operator to the two elements and push the result back on the stack?? please help me to …

Member Avatar for aman rathi
0
149
Member Avatar for gaurav_13191

Hi.. I am new to Dani web and would like to know the problem in the following code: [CODE] #include<iostream.h> #include<conio.h> void insertion_sort(int *p); int main() { int a[20],j; cout<<"\nEnter contents of array:"; for(int k=0;k<20;k++) { cin>>a[k]; } insertion_sort(a); return 0; } void insertion_sort(int *p) { int h,key; for(int i=2;i<20;i++) …

Member Avatar for gaurav_13191
0
89
Member Avatar for johnnyturbo3

Hi, I'm currently writing an application using VS C++, Qt, and SQLite. I have a user interface where the user uses a series of combo boxes to select certain criteria that they want to fetch from the database. When this dialog closes, all of the combo boxes selected text (string …

Member Avatar for johnnyturbo3
0
328
Member Avatar for frogboy77

Hey there folks. New at this so forgive any mistakes, first post. I'm beginning to learn c++. Not so easy. After reading a few threads went to project euler. Problem i have is problem 3. " The prime factors of 13195 are 5,7,13 and 29. What is the largest prime …

Member Avatar for frogboy77
0
713
Member Avatar for let us c

hi i want to display pascals triangle on computer screen.the pascals triangle goes like this. and what is logic. 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 and so on.

Member Avatar for sunyifei23
0
158
Member Avatar for r14r

I have command string and want to find a pattern in it.If present i have to remove certain characters and retain the other characters as it is in the command string. [code=c++] string aDir("bin/kwp-init start -t1 -uwelcome@mails.com -ppasstoks@123 -v"); string search_char ("@"); size_t found=0; found = aDir.find_first_of(search_char); cout <<"@ is …

Member Avatar for sundip
0
116
Member Avatar for rocky_kuet

#include<fstream.h> #include<iostream.h> #include<conio.h> #include<dos.h> #include<stdio.h> class ALARM { public : struct time t; int m,h,a,b; void resetalarm() { ofstream x("D:\\hour.txt"),y("D:\\minute.txt"); a=0,b=0; x<<a;y<<b; x.close();y.close(); } void setalarm() { ofstream x("D:\\hour.txt"),y("D:\\minute.txt"); cout<<"\n\n\t\t\t\tEnter hour\n"; cin>>a; cout<<"\n\n\t\t\t\tEnter minute\n"; cin>>b; x<<a;y<<b; x.close();y.close(); } void alarmmatch() { ifstream i("D:\\hour.txt"),j("D:\\minute.txt"); i>>a; j>>b; i.close();j.close(); gettime(&t); m=t.ti_min,h=t.ti_hour; if(h==a&&m==b) {cout<<"\n\n\t\t\t\tTime …

Member Avatar for nbaztec
0
2K
Member Avatar for sana_moi

hellow every body i m trying to do a graphique interface using c++ but i cant know which .dll i have to use such im using visual studio c++ 2010 express edition . when i thank to use QT with vs2010 there is a lot of problemes caus i don't …

Member Avatar for sana_moi
0
86
Member Avatar for sbrohee

Hi all, I have a more philosophical question which I think might help me to better understand the interest of pointers in C++. Indeed, my background is mainly Perl and a bit of Java. I am currently implementing (as an exercise and because I work in this field) a class …

Member Avatar for sbrohee
0
118
Member Avatar for elsiekins

I am trying to write a named semaphore, can anyone point me in the right direction. I have tried googling it. I come from a java background so i understand the theory. Is a named semaphore created in the same way an semaphore is ?

Member Avatar for elsiekins
0
111
Member Avatar for sbrohee

Hi everyone, I am quite new to C++ (coming from perl). As an exercise, I am currently trying to create a class to play with graphs. I have a class Node in which I overload the == operator (to test the equality between two nodes). At the moment, I consider …

Member Avatar for sbrohee
0
266
Member Avatar for johnb08

How would I make a 3,4,5 triangle print out in a GUI. I was using the drawline function, but I can't figure out how to make it so its between two coordinate points. I have some code like this to draw a line [code] // draw line coloredPen->Color = Color::Red; …

Member Avatar for johnb08
0
121
Member Avatar for rahulrulez

We've to build one mini project on Vending Machine.. Our Guide have given us following topics to be covered in mini project - [LIST] [*]Normal Vending machine program working on Deposited balance - Can do it [*]Login and Password for 5 members to store their individual spares separately [*]Permanent storage …

Member Avatar for ika_rees
0
624
Member Avatar for wwefriend

im juz learn C++ from C++ how to program , but i not really understanding in this section ,can someone explain and describe?..thx...

Member Avatar for wwefriend
0
132
Member Avatar for ticktock

Hey all, I am currently trying (desperately trying if I might add) learning how to use GLUT for school. Our professor gave us an assignment to make a 2d tube of some sort, but I only managed to make a circle. The tube will be only displayed on its front …

Member Avatar for ticktock
0
313
Member Avatar for el33t

Hi, I have a doubt regarding inheritance of base class constructor by inherited class. I was recently going through some C++ online tutorial when I came across this piece of code: [CODE=c]#include <iostream> class Foo { public: Foo() { std::cout << "Foo's constructor" << std::endl; } }; class Bar : …

Member Avatar for caut_baia
0
191
Member Avatar for PixelExchange

Hello everyone.. When working with Visual Studio 2010, the "MessageBox" function displays chinese characters, instead of english ones. Example: I attempted to prompt a message to myself using the messagebox function, saying "Success!" However, the message box pops up a message in chinese, and not in english. I am able …

Member Avatar for PixelExchange
0
167
Member Avatar for jwxie

I am confused. Here is the source: [url]http://www.learncpp.com/cpp-tutorial/28-constants/[/url] [QUOTE] Literal constants Literal constants are literal numbers inserted into the code. They are constants because you can’t change their values.[/QUOTE] Why can't we change literal constant? I mean if we want to initialize something, let say [CODE]int x = 14;[/CODE] And …

Member Avatar for jwxie
0
93
Member Avatar for dadam88

I just started to get a grasp of classes. I can't find my answer anywhere, and I hope someone on here can answer it. I am trying to simlate a battle [B]USING CLASSES[/B] Everywhere I look on the net people in C++ don't use classes to simulate battles. You could …

Member Avatar for dadam88
0
99
Member Avatar for DaSpirit

Hey guys, I'm new here. I just started learning c++ and I'm having a few problems. I have looked for one online but I found none that really worked for me so I tried to make my own. I'm trying to make a constant frame rate at 30 frames per …

Member Avatar for DaSpirit
0
282
Member Avatar for gaurav_13191

Hi,I am new to daniweb and would like to know the error in this code [CODE] void initpoly(struct poly *p) { int i; p->noofterms=0; for(i=0;i<MAX;i++) { p->t[i].coeff=0; p->t[i].exp=0; } }[/CODE] I am not posting the entire program because it is lengthy.I am getting the error"Expected primary expression before token ;" …

Member Avatar for gaurav_13191
0
240
Member Avatar for mehak gupta

Hey,can anyone tell me how to invoke a new application/software using c++ or visual c++. Also, gor interfacing a gui with my c++ code,should i go for vc++?

Member Avatar for mehak gupta
0
249

The End.