49,761 Topics

Member Avatar for
Member Avatar for xiaojesus

Hi i have this code below i am encountering that my int a,b; got error because they are delcare in private. but the code turn out fine if i delcare them in public. is there anyway i can make them remain in private. i think need to use reference or …

Member Avatar for Sky Diploma
0
87
Member Avatar for Dannyo329

Hey, Im trying to get the user to type in a file name, and then the program will copy the file to some where else like C:\ or USB or something. So far this is what I've come up with: [CODE] #include <iostream> #include <windows.h> #include <stdlib.h> #include <conio.h> #include …

Member Avatar for Dannyo329
0
134
Member Avatar for awais.abdul

please help me solving this i want to show the composition,aggregation,simple association between the classes see attatched gif image plz help me i shall be very thank full to all

Member Avatar for Salem
0
251
Member Avatar for Lukezzz

I have a backgroundworker that is running. The problems comes when you press the closebutton on the form in the upper right corner. This makes the form stuck completely. The problem is that the Worker doesn´t get a chance to finish and return the backgroundWorker1_RunWorkerCompleted event. How can I come …

Member Avatar for Lukezzz
0
108
Member Avatar for 3beer

hey, we r asked to do a student data base using c++ and I'm having problem in appending in the file without redundancy in my code i'm dealing with strings is it possible to append on the string without creating a new one or i should chose another data type …

Member Avatar for 3beer
0
101
Member Avatar for Arystar

hi im stuck i'm making a program and i made it get maximized on open with this nice code [CODE]void Openmax() { HWND hWnd = GetConsoleWindow(); ShowWindow(hWnd,SW_SHOWMAXIMIZED); }[/CODE] but now it also needs to open in the center of the screen. i tried the SetWindowPosition() and SetConsolePos() but i couldn't …

0
54
Member Avatar for Punkis448

In this work you will materialise a algorithm that solves the problem of Stable Marriage. In this problem we aim at "n" men and "n" women and our goal is the contracting of constant marriages between men and women. Obviously each man can be wedded only one woman and one …

Member Avatar for jephthah
0
345
Member Avatar for handytxg

[code] #include <iostream> using namespace std; class person { private: string name; int age; public: person(const string &getname): name(getname), age(0){ } void addAge(const string &getname) { age++; } void getAge(void) { cout << endl; cout << name << " now " << age << " years old"; } }; int …

Member Avatar for tux4life
0
235
Member Avatar for pyramid

I have been working on this lab for a couple of days. I need to write a program (using a 'for loop') that approximates pi using the following series: pi = sqrt(6* (1/(1)2 + 1/(2)2 + 1/(3)2+ 1/(4)2 + 1/(5)2 +...... + 1/(n)2)) where n is the number of terms. …

Member Avatar for Nick Evan
0
292
Member Avatar for nanchuangyeyu

Hi, I am writing some code to model the neighborhood of an element in an 2D mathematic matrix(using 2D vector) ,e.g. to an element indexed by vec_2d[x][y], I want to present its neighborhood in form of a vector which is composed of vec_2d[x][y-1],vec_2d[x-1][y-1],vec_2d[x-1][y] and vec_2d[x-1][y+1]. And following my code is …

Member Avatar for Nick Evan
0
824
Member Avatar for leowasif

i had to make the car racing game in c++ by using classes but can't understand it, the requirement of the game r it contain speed o meter, fuel and gear system and move in all four direction plz help me.... no graphic r required just simple car game on …

Member Avatar for Nick Evan
0
305
Member Avatar for Considerate
Member Avatar for HunterFish

How to sort an xml file or a text file using gtkmm? This is the sample of the file that I want to sort. <LIST> <name> Example </name> <country> <name> Country </name> <pop> <desc> Japan </desc> <uri> 100 </uri> </pop> <pop> <desc> China </desc> <uri> 108 </uri> </pop> <pop> <desc> …

Member Avatar for HunterFish
0
186
Member Avatar for amerabdullah

Hi, would someone please help me with the following quotions (the required is to implement a simulator for processes scheduling that takes a file contains N of processes each with required details,and then after reading these information from the input file ,the scheduler should schedule the processes for execution. input:N …

Member Avatar for MosaicFuneral
0
92
Member Avatar for Deme

Alright, so i'm trying to make a type of database using file i/o where you type in a username and password and it writes it to database.txt... The issue is, i'm trying to find a correct and clean way of reading, or 'searching' for the username and password and compares …

Member Avatar for valtikz
0
975
Member Avatar for Lukezzz

I have a problem when it comes to cancel a backgroundworker from working. I start the backgroundworker successfully and the worker supports cancellation is set to true. What I do is to use a button that both can run the backgroundworker and next time you press the same button, it …

Member Avatar for Lukezzz
0
113
Member Avatar for Xellos_Moon

Help me solve this problem, dont worry, im just starting out so its all very basic...and easy to you guys, i would imagine. [QUOTE]Two strings X and Y are said to be conjugates if, by shifting the symbols of Y in a cyclic fashion zero or more times, you can …

Member Avatar for ArkM
0
87
Member Avatar for Akis2000

hi.. ok here is my problem i want to make a fuction that ask from the user which series he/she wants to use and the precision (number of digits, up to 10). If after 10000 iterations the series doesn't find the value of p, it should display an error message. …

Member Avatar for Akis2000
0
327
Member Avatar for Sky Diploma

Here is a comment stripper program from which takes input from Cin and removes the comments. [CODE=C++] #include <iostream> #include <fstream> char Getchar(); char var; int main() { char ch; do { Getchar(); switch(var) { case '/': switch(Getchar()) { case '*': Getchar(); while(true) { if(var=='*'&&Getchar()=='/') { break; } else { …

Member Avatar for tux4life
0
321
Member Avatar for ulisse0

Sometimes [ICODE]_getcwd()[/ICODE] returns the parent direcory of the current one, other times returns the folder of the current user.. Has it ever happened to you-all? Thanks in advance

Member Avatar for ArkM
0
503
Member Avatar for Lukezzz

I use this random generator for numbers but it seems that this generator isn´t really random because it seems to generate the same "Random" sequence chain every time I restart the application. Is there a better way to generate random numbers than this, that is more random ? [code] for( …

Member Avatar for Lukezzz
0
223
Member Avatar for Greeny28

Hi, I was hoping someone could correct my mistake. I'm trying to store references (or pointers should that be better) in a hetrogenous List. (The references or pointers will point to mixed classes). The problem is that everytime I store the pointer which holds a reference to the object, the …

Member Avatar for Narue
0
138
Member Avatar for meistrizy

Thanks in advance for your help. My code is doing some weird things and I can't figure out why. The purpose of my program is to have the user input any number and get the day of the week, month, day, and year and if that year is a leap …

Member Avatar for meistrizy
0
125
Member Avatar for Seamus McCarthy

Hey, i set up a circular queue to sort and pass ints easy, but having problems passing struct of information to the queue, wat declaration should i pass to insert function?? Here is my code so far, what would i change the int item to in insert function?? have just …

Member Avatar for Seamus McCarthy
0
159
Member Avatar for Rajesh1978

Hi, I am a computer professional. I have 3 years of experience in C++ on financial domain. I did not get a chance to work in networking domain. When I go for any change people are asking about the Networking domain and IPC programming. How can I master that though …

Member Avatar for Ancient Dragon
0
115
Member Avatar for mnkdpatel

I am studying C++ programing and i have a assignment which create a maze, which is a two dimensional array of size entered by user and the density also entered by user density is percentage of obstacle in the array. one mouse enter from the bottom of the array from …

Member Avatar for iamthwee
0
76
Member Avatar for drunkenmonk

I am writing a program to manipulate a stack containing integers using push, pop, print, etc. The only thing I have left is to write a function called copy. Here is what I've tried so far: [CODE] void Stack::Copy(Stack otherStack) { otherStack.top = top; for (int ii = top-1; ii …

Member Avatar for drunkenmonk
0
3K
Member Avatar for Akis2000

hello, i have a double value=0; and i want before starting the calulation to round this value in the numbers that the user add, for example 2... any ideas??? I have despered...........

Member Avatar for Akis2000
0
140
Member Avatar for kailisr

//I am having problem with the final portion of my program; it is for a class. //This is what I have so far, and the exact instruction I have for final part are: //Finally, modify the above program to read the numbers in from a text file (numbers.txt), write the …

Member Avatar for kailisr
0
100
Member Avatar for lukeriverplate

I am trying to input a data file into C++ such that it will appear as 2 arrays of maximum value 100... so far, this is what I have... void readfile(double x[], double y[], double sigma[], int * entries) { /* read data into x[] and y[] fill sigma[] with …

Member Avatar for s_sridhar
0
150

The End.