49,761 Topics
| |
I'm working c++ project but before I can start coding I am required to analyze the problem and determine potential objects/classes - Object Orientated Analysis. I read through the paper a few times and did my analysis. Tell me what you guys think. I'm not verse in this area so … | |
hi, i am totally new to this and i would appreciate some advice or if you guys know any articles i could look at to research. I want to create a program that will copy the contents of RAM to another file. I have no idea where to start! It … | |
Ok, I am tryin to use the proper coded way that a few of you have asked, so don't yell if I screw up the first time, please. I was able to debug and run, but had many errors, I have fixed several already, biggest problems are that if I … | |
Hello, I would like to pose a very simple question, does anyone know how to clear the command window of text, and give it a name(Eg. Cosmos's Program) I would like to make room for different lines of text in my program, and also give it a name, for obvious … | |
What enables C to support variable function arguments (varargs), while other languages (like Java) do not support this feature? What is special in C which is not there in Java to support this? | |
| Hi. I am trying to make a program that will launch restricted user-specified programs at my school. How would I make the system() function below make use of the two variables in it. I've tried && and ||, but the bugger wont work. [code] #define runasc "runas /profile /user:tsc\\staffuser" system( … |
Hi, I am pretty new to C++ and would really appreciate some help. I'm trying to write a program that will click on a particular color pixel on my screen. For instance, the program would click on a blue dot on my desktop. I play a mmorpg and I have … | |
So My input document has the following data 56 38 A 7 8 My program: #include <iostream> #include <fstream> using namespace std; int main() { ifstream inData; ofstream outData; int num1, num2, num3, num4; char ch1; inData.open("c:\\inDatat.txt"); outData.open("c:\\outData.txt"); inData >> num1 >> num2; outData << "Sum of " << num1 … | |
I am trying to use ifstream to read from a file. When you use ifstream you have to specify the path like this. [code] ifstream Symb("Folder1\\Folder2\\File1.txt"); [/code] Instead of specifying like that, I will find a variable Text from a comboBox like the code below. Path has the string: "Folder1\\Folder2\\File1.txt" … | |
I need help fixing this I help getting errors #include <cstdlib> using namespace std; void show_word (string); int main () { show_word ("hello"); system ("PAUSE"); return 0; } void show_word (char); { char InName; cout << "Enter your name " << endl; cin >> InName >> endl; show_word ("hello"); show_word … | |
Hello! I was wondering how to generate random numbers within a given range X and Y using rand. Thanks!! I was thinking that it may be along the lines of [code] rand() & x+y [/code] however this does not work. Any help would be amazing! Thanks guys and gals! | |
Soooo I essentially need to make a program to evaluate any exspression that is plugged in to it, how would I go about starting a program like that ? I know how to evaluate normal exspressions including + - * / but what if a user wants to do a … | |
I am trying to get the text that is choosen in a comboBox. I have tried these codes but no of them are working. What am I doing wrong here ? [code] std::string Text; // I have tested all 4 of these and this will not compile. //I belevie it … | |
| Write code to prompt the user to input a character and a number. Then print out the character that number of times. This is one of many questions I must answer, but it will help me get started on my code. |
Consider the following user-defined function: [code]void Quick_Change (int x, int & y) { if (x == 0) y = 10; else if (y == 0) x = 10; } [/code] Assume the values in variable A and B are both of int type. How do I find what the values … | |
Hi, I'm a new one for c++. I want to call a function in time intervals. (as an example lets say for every 100ms ). How can I do that. Please help:S Thank you | |
no idea what to do about this error =/ [code]#include <stack> #include <string> #include <iostream> #include <fstream> using namespace std; int main () { stack<string> stack; ifstream inFile; string consoleStr = "Enter Filename>> "; string fileName; string word = ""; char c; cout << "Welcome! Enter filename or quit to … | |
I wrote a class in vs2008. I am creating a new project and I need to incoporate that class into it. How do I do that. I added the .h to the header section and the .cpp to the source file. In the new program i did #include "firstclass" but … | |
help with c++ problem. a software company sells a package that retails for $99 . Quantity discounts are given according to this table. Quantity Discount 10-19 20% 20-49 30% 50-99 40% 100 or more 50% Write a program that asks for the number of units sold and computes the total … | |
At this point I am trying to get data from a std::list or std::vector. I push_back the object from a pointer into the list and go on my merry way, I do this until I get to the point I want (which is working at the moment) but then when … | |
how do I wrtie a function that takes one argument of type double. The function returns the character value ‘P’ if its argument is positive and return ‘N’ if its argument is zero or negative. [code=c++] double Letter ( double P, double N) if (P = +); return P; else … | |
When I try accesing private members of a class using friend functions after including the concept of templates in visual basic c++, the compiler shows me an error message that friend functions cannot access the private members declared in class. Please help..... | |
| Write a program that will prompt the user to input the following: length and width of a rectangle , a character, and a choice for either filled or unfilled. If the choice is filled, print out a filled rectangle with the indicated length and width using the input character. If … |
First: We know that it is better to write the declarations of a class in header file And it's definition in another source file BUT if the class is template I have a problem to link the two files header and source it will appear two errors about linking Second: … | |
Hey, This may be real basic and Im just drawing a blank. How would you process a byte of info recieved over a serial port. I am writing a char*, recieving 1 (4 bytes) char at a time. I would like to return the entire read back as a char*. … | |
Hello all, I have been working on a homework assignment that has to build a program for a user to enter student's grades and see the student's average as well as a class avaerage. Besides some cleaning up, organizing, and labeling I am pretty happy with it and it is … | |
Hi.. i want to execute a program(done using c++)when my computer is about to shutdown.i am using Windows Xp. how can it done?? | |
Hello everyone, and thank you in advance for any help you can give! I am working on a simple program with some long integers, which I have defined as type long long, with LLU after them. I am trying to use these variable names in an arithmetic expression, but when … | |
I am having alot of trouble with coming up with a pseudocode and drawing a hierarchy chart for the following problem. If anyone could give me any pointers on what to do that would be great. Thank you !!!! [B] Develop the logic for a program that gives you the … | |
i have following code in ATL COM class (There are existing methods and i added a new methosd) --------------------- STDMETHODIMP CCLS::GetCountryList(<parameters>) { //method body and return val } COM builds successfully. But from my asp code does not detects the new methos where as it detects all OLD methis. Note … |
The End.