49,761 Topics
| |
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? | |
[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; … | |
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 … | |
any one can help me hw to write tic tac toe program using visual studio... | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 = … | |
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 … | |
I need to what are forks and where we use them in C++. Are they essential???? | |
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 | |
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... | |
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: … | |
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 … | |
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(); … | |
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 … | |
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 … | |
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 … | |
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 ) … | |
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 … | |
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 … | |
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 … | |
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 ******************** ***** … | |
| |
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] … | |
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 … | |
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 … |
The End.