49,757 Topics

Member Avatar for
Member Avatar for Ta1da

Hi i just started learning C++ & we were given homework to write code that will show names numbered to six and display the longest name entered. i have managed to show the names going in numeric order just can't display the longest one. Thanks for any future help... (Also …

Member Avatar for Salem
0
1K
Member Avatar for wjyeo

hi guys, do anyone know y izit that when i print a large list of number say 10000 for sorting, my original random number go missing even though i place a printf command to display them? the end result is only the sorted values.

Member Avatar for Salem
0
63
Member Avatar for ankitrai

I have defined some classes which are giving a linker error like the one in the subject. could anyone provide some info on the error, I have understood it has something to do with the virtual table but am not able to figure out what. what makes it more harder …

Member Avatar for ankitrai
0
57
Member Avatar for JRM

hello all, I am trying to compile this canned example in QT4 , but the compiler spews out an error messagethat I have never seen before. The *.cpp file: [code] #include <QtGui> #include "finddialog.h" FindDialog::FindDialog(QWidget *parent) : QDialog(parent) { label = new QLabel(tr("Find &what:")); lineEdit = new QLineEdit; label->setBuddy(lineEdit); caseCheckBox …

Member Avatar for vijayan121
0
202
Member Avatar for seanw

Hi, I am having a strange problem with a simple process. Heres the code. [CODE] bool areNumbers = true; bool Anything = true; int numBytes = 1; long inCrem = 0; while(gPlacerID != tgPlacers[inCrem]->GetPlacerTypeID()) { inCrem++; if(inCrem == tgPlacers.size()); { Anything = false; break; } }[/CODE] This code is part …

Member Avatar for seanw
0
104
Member Avatar for ellenski

hi, i'm supposed to create a very simple address program in C & not in C++. my program works but my problem is how to "search & edit a record" and how to "search & delete a record", that is what i lack. this program is really giving me a …

Member Avatar for Aia
0
150
Member Avatar for pop007

Hello all, I got problem to write program concerning in money deposit into bank. i.e : money = 100$, month = 3, interest = 3%/month here we got : 1- Enter money into bank = 100 2- Enter month = 3 3- Total amount = 109.27 4- Total interest = …

Member Avatar for Bench
0
96
Member Avatar for kodiak

I would like to make a MUD in C++. So...=) I need to know how i would program it so that other players could attack, see, and trade with each other. I'm gonna host it on my computer, or maybe a remote shell account, so my friends and i can …

Member Avatar for Bench
0
135
Member Avatar for krnekhelesh

I need to what are forks and where we use them in C++. Are they essential????

Member Avatar for Salem
0
225
Member Avatar for Ptarila

how to include the comctl32.lib library in your application in visual c++ in a site it said To include the comctl32.lib library in your application, on the main menu, click Project -> Add Existing Item... but 4rm project...i don't see ane Add Existing Item

Member Avatar for Ancient Dragon
-1
103
Member Avatar for Allan03

I can't find way to compare two dates (SYSTEMTIME). I need to know if the date1 is greater than or equal to date2. Thnx in advanced...

Member Avatar for Ancient Dragon
0
818
Member Avatar for rainbow78

here what I got and I keep getting a error because of the "string names[];" these were my guide lines and I'm getting confused //declare an array of datatype string //call it names[] //declare a function dataEntry that takes a string array as input void dataEntry(string arr[]); //implement the function: …

Member Avatar for spider_pig
0
93
Member Avatar for zandiago

ASSGINMENT #1 Accounting teachers, being naturally inept with numbers, have a difficult time calculating students’ averages and assigning letter grades at the end of each semester. Your accounting teacher is no exception. To make this end of semester grading easier, and more accurate, he hires you to write a program …

Member Avatar for zandiago
0
2K
Member Avatar for Arctic wolf

Hello, I made a program that uses a random number generator, my generator looks like this: [code] void randomize () { srand((unsigned)time(NULL)); } int random (int highest) { int randomnum; randomnum= int(highest*rand()/(RAND_MAX+1.0)); return randomnum; } [/code] here is the piece of code that calls the generator: [code] int first,second; randomize(); …

Member Avatar for Bench
0
157
Member Avatar for Dij

Hey guyz!!! Wel i am a new user on this site....and m kinda needz advice fer learning this c++. I am a totaly new to the concept of C++ and have no previous knowleadge of C or any other programing language..... Now since I have no idea what c++ or …

Member Avatar for jbennet
0
90
Member Avatar for bops

Why is it that in my commctrls.h some things such as using CDIS_SELECTED (used to determine state of control when custom drawing) I can't use. The compiler says that i.e. CDIS_SELECTED undeclared first use this function. [code] #if (_WIN32_IE >= 0x0300) #define CDIS_CHECKED 8 #define CDIS_DEFAULT 32 #define CDIS_DISABLED 4 …

Member Avatar for Ancient Dragon
0
506
Member Avatar for spider_pig

Supposing I have a class Dog with attributes age and color. I also have a function print(string) which invokes the accessor functions for the dog attributes. Now when the user enters the name of a Dog object at the command line I would like to call the print function to …

Member Avatar for ShawnCplus
0
92
Member Avatar for bops

Trying to alternate row colors in listview control but handle for selected items. Message Loop of parent window (DialogBox) [code] // case WM_NOTIFY: { // NOTE: g_hList is the ListView Control // : hWnd is the parent of g_hList (Dialog Window) if ( LOWORD( wParam ) == (WPARAM) ID_LIST ) …

0
63
Member Avatar for quintoncoert

hi. can someone tell me if there is some way to open or start execution of a program by typing in some sort combination of keys on the keyboard? For example if I have a program called program.exe and it is stored on the hard-drive is it possible to start …

Member Avatar for quintoncoert
0
184
Member Avatar for bops

Hey, I have a ListView control in a dialog box that I want to have alternating row colours but obviously account for when a row is highlighted. This is my attempt so far but all I get is a blank looking listview, but I know the values are inside of …

Member Avatar for bops
0
299
Member Avatar for Ptarila

why do these two programs have different outputs when you run em...i've been tryin to figure it ...all morning [code=cplusplus] FIRST PRORAM //---------------------------------------------------------------- #include <windows.h> //#pragma hdrstop //-------------------------------------------------------- //#pragma argsused //-------------------------------------------------------- const char *ClsName="FundApp"; const char *WndName="Resouces Fundamental"; LRESULT CALLBACK WndProcedure(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); //------------------------------------------------------------------------------------ INT …

Member Avatar for Ancient Dragon
0
108
Member Avatar for pin

bjectives: 1. use the divide and conquer method. 2. use VOID. by this figure, how can i can i make a program by using the divide and conquer method?how can i make this a program to form a box? ******************** this 2 upper lines has 20 (*) sign ******************** ***** …

Member Avatar for Bench
0
99
Member Avatar for Ptarila
Member Avatar for Ancient Dragon
0
107
Member Avatar for khalidxa

I have been trying to return a two dimensional array in a function but it is getting me no where, please tell me how to do it. the code is as follow : [CODE] int *population();[/CODE] [CODE]int *testCase::population() { for(int i=0;i<3;i++) { for(int j=0;j<2;j++){ matrix[i][j]=rand()%2; } } return matrix[0][0]; }[/CODE] …

Member Avatar for Salem
0
170
Member Avatar for jerryseinfeld

Hi....... I have a complicated homework...... I have a data which is csv file. I have to take this data from csv file and do sum calculations on these data's elements. But my problem is I cant take data from csv file to do this... I can take data from …

Member Avatar for vijayan121
0
496
Member Avatar for dionie

Hi I've just started C programming and I need so help with writing programs espcially this one .Write a C program that allows the user to enter five(5) scores (between 1 and 100). The program must calculate the average score, and state the number of scores over 80, and the …

Member Avatar for WaltP
0
71
Member Avatar for ayk-retail

I have this lab from a C++ class that I can't get to work... Write a function containing a simple sort program that will sort an array of integers by using the stack class (as used in Ex_10). The array (pointer) and its length should be passed to the function …

Member Avatar for ayk-retail
0
138
Member Avatar for ayk-retail

I am trying to figure out how to sort an array with a stack class. The array (pointer) and its length should be passed to the function as parameters so that the original will be sorted. The array created in main() should contain a maximum of 20 integers which should …

Member Avatar for iamthwee
0
153
Member Avatar for nubbie

double a,b; cout<<"Enter Value"; cin>>a>>b; jus a simple program...whenever a character is Key in ..the program error.i know is because of the double only for integer.how can i edit it so that it will return me a cout<<"U have to enter a integer"; when character is enter. anyone can help …

Member Avatar for WaltP
0
112
Member Avatar for GenS

Hello. Apologies if this subject has come up before but much searching hasn't produced anything of any use. I currently have a program which reads data in from a specific file and then processes it etc etc but what I need to be able to do is somehow put a …

Member Avatar for GenS
0
141

The End.