49,761 Topics
| |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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. … | |
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 … | |
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 … | |
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> … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 { … | |
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 | |
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( … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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........... | |
//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 … | |
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 … |
The End.