49,761 Topics

Member Avatar for
Member Avatar for pokemon123

I'm using visual studio for the program. When i prompt the user for date like is this format -dd/mm/yyyy . For the program how do i use the data for just the year only not the whole input?

Member Avatar for iamthwee
0
235
Member Avatar for mastan

[code=cplusplus] #include <iostream> #include <string> using namespace std; enum SquareState { (blank = 's', X = 'X', 0 ='0') }; class gameBoard { private: const int WIDTH; const int HEIGHT; int* GameBoard; public: gameBoard(): WIDTH(3), HEIGHT(3) { GameBoard = new int [9]; for (int i = 0; i < 9; …

Member Avatar for Salem
0
110
Member Avatar for TheGathering

I'm using wxDev-C++ to write an auto-clicker program that I'm hoping to release as FOSS one day. I wrote some really neat algorithms that I tested in Java to be implemented my project so it can be used in games and such as that. (It's not school work, just something …

Member Avatar for TheGathering
0
128
Member Avatar for mastan

any one can help me hw to write tic tac toe program using visual studio...

Member Avatar for mastan
0
100
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
107
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
155
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
137
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
229
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
822
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
95
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
507
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
187
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
301
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

The End.