49,757 Topics

Member Avatar for
Member Avatar for kinggarden

[LIST] [*][quote]Write a program which finds the factorial of a number entered by the user. (check for all conditions) (Beginner).[/quote][/LIST][code=C++] void findfactor(const unsigned int number) { unsigned int n = number; printf("The factors ot the input number are:\n"); if (0 == n) { printf("%d\n", n); return; } for(unsigned int i …

Member Avatar for Narue
0
119
Member Avatar for MrMan2787

i am trying to write a program that takes information from a file and reads it and then does some kind of encryption, simple as adding one to it I have it reading the file, but how would i go about readings the characters as int's and then adding a …

Member Avatar for Ancient Dragon
0
101
Member Avatar for ongxizhe

Hey all. Does anyone knows where to get some good tutorials of programming C++ Graphical User Interface? If so, please kindly send a PM and include your contact or reply here. Your help willl be appreciated. Thank you. Xizhe

Member Avatar for ongxizhe
0
374
Member Avatar for Matt Tacular

I need to set up 2 buttons to take input from the user, that increase and decrease a variable, it doesn't matter which 2 buttons are used, but preferably the up and down arrows. And I also need to have a display of the variable that constantly updates as it …

Member Avatar for Opo
0
146
Member Avatar for Matt Tacular

Is there a way to make a loop that creates strings? I ask the user how many players there are, and then the loop makes that many strings in order to get all of their names... Something like this, (but not in normal english...): [code]cout << "How many players? " …

Member Avatar for Ancient Dragon
0
104
Member Avatar for jaepi

Hello there. I have here a constructor of class CDriveControl and class CSPTIDriver.. [code=c++] class CSPTIDriver; class CDriveControl{ public: CDriveControl(); CDriveControl(const char* pPort); ...... ...... protected: char* m_pPort; CSPTIDriver* m_pSPTIDriver; bool m_bInitFlag; bool m_onlycomp; } [/code] It was defined outside the class. [code=c++] CDriveControl::CDriveControl(void) :m_pPort(NULL) //Object drive ,m_pSPTIDriver(NULL) //SPTI object …

Member Avatar for jaepi
0
251
Member Avatar for meiyantao

I don't ensure whether "0" or "NULL" is better to be an empty point's value in C++. Could anybody can tell me,and why? Then how about it in C, why? Thank you!

Member Avatar for Narue
0
145
Member Avatar for Matt Tacular

Can anyone tell me why this doesn't work? I know it's probably really easy, but I did try.... [code]/* ISU program created by Matt in grade 12 programming. */ #include <iostream> #include <list> #include <iterator> using namespace std; class humanPlayer { public: humanPlayer(char thePlayersName, unsigned int thePlayersTurnNum); //constructor ~humanPlayer(){}; void …

Member Avatar for Narue
0
114
Member Avatar for Matt Tacular

When using an STL list, how can I check if a certain variable happens to just be in there? Basically, given this already: [code]#include <iostream> #include <list> #include <iterator> using namespace std; list<int> integer_list;[/code] I need a way to code this in C++: [code]if(x is in integer_list){ do this }[/code]

Member Avatar for Matt Tacular
0
95
Member Avatar for Daan

Hi, I'm trying to use a program, written by others, that has C/C++ code compiled as part of its setup procedure (it's called Content - integrated environment for the analysis of dynamical systems). However, c++ (or g++ actually) complains about invalid conversions and cannot compile: [code]autodif.c: In function ‘char* Mult(char*, …

Member Avatar for vijayan121
0
141
Member Avatar for Daco

hey everyone, im making a program that controls my cube using GCNRD. but shellexecute is being a tard to me the code should work like this: enter a value and the program starts gcnrd to poke the value i got that in these lines [code=cplusplus] string CButton; string CoButton; cout …

Member Avatar for Daco
0
148
Member Avatar for kinggarden

Hi, everyone. I have worked in IT field for about 1 year, before that my major was physics. So I feel I'm just a new guy in this field, and I hope you could help me:) Now, I work in a embedded C++ project on WINCE platform. I'm not very …

Member Avatar for kinggarden
0
123
Member Avatar for Eko

I'm looking for a C++ book with exercices(solved),practice or something like "tips and trips of c++ language" cause I need to prepare for the exam. If someone know's a kind of this book , pls reply.I searched google , but didnt found what i want

Member Avatar for Narue
0
127
Member Avatar for nedwards

I was wondering by using the Visual Studios 2005 and Windows XP could you write code in C# and add some other code in C++? What is happening is that I am updating this program that was previously made in C# and I need to add some security functionality, although …

Member Avatar for nedwards
0
134
Member Avatar for tech291083

Hi, I am on Fedora Core 5 32+bit and learning standard C++ (not VC++) on my own using the terminal only and not any particular IDE. Is it possible to write and compile a small C++ program that can create very basic types of graphics in a terminal? Not sure …

Member Avatar for John A
0
53
Member Avatar for sundar divas
Member Avatar for Narue
0
103
Member Avatar for bops

Hi, I want to very simply give a specific control a specific font when creating a GUI. For example, I would like a multiline edit text control to have a courier new font. I have been searching for hours and can't really make much sense of what I am looking …

Member Avatar for WolfPack
0
67
Member Avatar for fahima.s

I want to write a server side application for Pocket PC. I wrote it in eVC++ by deriving a class from CCeSocket. But i couldnt accept a connection. How to do socket pgming in PocketPC. My aim is to send messages to pocket pc from desktop application when an event …

Member Avatar for jbennet
0
34
Member Avatar for sundar divas

Program received signal SIGSEGV, Segmentation fault. 0xff2209e8 in _write () from /usr/lib/libc.so.1 (gdb) up #1 0xff212bf4 in _xflsbuf () from /usr/lib/libc.so.1 (gdb) up #2 0xff21000c in _flsbuf () from /usr/lib/libc.so.1 (gdb) up #3 0x00000037 in ?? () (gdb) up #4 0x00000037 in ?? () (gdb) up Previous frame identical to …

Member Avatar for vijayan121
0
101
Member Avatar for castegna

I need to do a non-recursive function for count the leafs in a tree. I have the recursive algorithm, Can someone help me to figure this out!! count leafs int count_Lnodes(root, int cnt) { if (root != NULL) { cnt = count_Lnodes(root->left, cnt); cnt = count_Lnodes(root->right, cnt); if (root->left == …

Member Avatar for Narue
0
123
Member Avatar for Covinus

warning C4273: 'fileHandle::fileHandle' : inconsistent dll linkage. dllexport assumed. what does this warning mean? during debug i dont get this message but during release i have this one. can anyone explain the message to me and maybe give some remedy to it

Member Avatar for Ancient Dragon
0
480
Member Avatar for quintoncoert

I am using VC++ express edit 2005 but I can also switch to C# 2005 express. I would like to know if there is a cmd similar to the shell function which is found in visual basic. The VB shell cmd basically allows one to execute a dot exe file …

Member Avatar for Nick Evan
0
209
Member Avatar for complete

What is the difference in these two lines? #define X 100 const int Y 100; Apart from the fact that one is for X and the other is for Y (har har, very funny) effectively don't they do the same thing? Why would one be preferable over the other?

Member Avatar for vijayan121
0
119
Member Avatar for Sir_BigOne

Making a "hello" world program in VC++ 6.0 is cool, as I got a very happy feeling when i completed it... but reading alot of books to learn "a round about" way in something isn't me. I'm objective oriented. What materials should I, could I, get my hands onto learn …

Member Avatar for Covinus
0
93
Member Avatar for machine

Hi, Trying to overload - and getting this error. I am not sure why.. error C2447: missing function header (old-style formal list?) [code] #include<iostream.h> #include<string> #include<new> #include<ctime> using namespace std; class D { public: D operator- (const D &d2); }; D D::operator- (const D &d2); { //error points to here!! …

Member Avatar for machine
0
247
Member Avatar for jaepi

Hello there, I just want to ask if any of you guys here had experienced writing hardware controllers (dvd-rom, hard disk) using scsi protocol-multimedia commands. I just want to know your suggestions or maybe tutorials or example codes to well experienced in mmc (both windows and linux :)) that would …

0
57
Member Avatar for Woody714

I'm fairly new to C++ and have an assignment that is knocking me out. The text file is fairly simple: Plain Egg 1.45 Bacon and Egg 2.45 Muffin 0.99..... etc.... And the code is: [code=c] //Breakfast Billing System //Marlen LaBianco //May 20, 2007 //Program to calculate a local restaurant's breakfast …

Member Avatar for John A
0
921
Member Avatar for Matt Tacular

**I know the code looks big, but it's a very small isolated section at the bottom (starting at line 164) that's giving me the problem.** When this program is run, when I try to open the file I just appended some text to, it doesn't open... can anyone spot why? …

Member Avatar for Salem
0
143
Member Avatar for faisaly

Dear All, Please help me regarding this C++ Assignment. Q.1 [COLOR=green]Write a program using [B]malloc[/B] function. In which you take input from user and allocate memory equal to square of this number. Which multiply numbers and draw a table in the following format?[/COLOR] [B][COLOR=green]Hint: User enters 3 then program allocates …

Member Avatar for Salem
0
104
Member Avatar for MrMan2787

Hi all, I have a QUESTION regarding [B]data validation[/B] I'm writing a program, where i want the input to be [U]only integers[/U]. so if they enter things such as letters or symbols it won't crash my program. i tried stuff like, while(inputArray[count] != int) { cout << "Invalid Input. Please …

Member Avatar for Ancient Dragon
0
178

The End.