49,761 Topics
| |
Hello, I've been having a little dificulty with passing this array to my text file. What i'm doing is writing a questionaire type quiz which involves outputting questions, receiving input, and taking each input value and listing it in a text file. What I have works, except for writing the … | |
I'm trying to write a program that calculates the mean and standard deviation for a set of numbers. I broke the calculation down into a couple parts, and for some reason when I try to sum the differences squared I keep getting the wrong answer. Not sure why though. For … | |
Hello, I want to load integers from a text file into a class or structure. It should jsut read all lines and load them into it. What is aa easy code for this? I want to keep it simple and easy. Also it should be easy to modify, like modify … | |
This is what I have. It displays the 100, which is what 10 times 10 would be, but I want it to show a multiplication table. My Nest For Loop works fine doing the same thing but I can't get this to work properly. Can anyone help? { int row=0; … | |
So first of all let me say I am pretty new to C++ and find it very difficult to learn (especially when compared to say C#) Anyway I am working on a program that requires the use of a 2D array or a similar container. After talking with a professor … | |
Program: #include <iostream> using namespace std; class Rectangle { float len; float bre; public: Rectangle() {cout << "Rectangle constructed!" << endl; len=0; bre=0;} ~Rectangle() {cout << "Rectangle destructed!" << endl;} void setL(float L) {len=L;} void setB(float B) {bre=B;} friend float area(Rectangle rect); }; float area(Rectangle rect) { return rect.len*rect.bre; } … | |
**Assignment:** > 1. Print the following heading at the top of the output page: Miser Corporation Payroll > > 2. Read an unknown number of employee data records as shown below. Each group of data will contain an employee's name, hours worked, rate of page and age. A typical group … | |
I am working on a command line program that communicates with another program. What i am trying to do is after i write a command it will split the string so the number on the end will be put into a seperate variable. For example if i write the line … | |
Hi. I have this problem with a Windows Form Application. I'm working with the Client, the server is already working and tested. If you look at this code: void WaitForMessage() { bool dropserver = false; while(dropserver == false) { char inputmessage[250]; int bytes = recv(sConnect, inputmessage, sizeof(inputmessage), 0); if(bytes <= … | |
I want to load a 3D model into an opengl scene. For this I've read about the .obj format and how the vertex cord's and etc are stored. I want to parse this file, but have completely no idea what soever how to begin with. After going through couple of … | |
I am a begginer in c++ and our teacher did start from the presumtion that we know C allready and jumped straight to advanced c++. Unfortunatly i do not know C and have trouble catching up. I mention that this is our 4th week and i got to do the … | |
I've read articles saying that Ctrl+Alt+Del is an in-built Windows combination and cannot be disabled. Basically, I'm trying to make something like an anti-virus and most antivirus tools are practically impossible to shutdown by using CTRL+ALT+DEL combination. The moment one shuts down the process, another instance runs in a way … | |
Hi guys, I'm working on a program that (for the step I'm having trouble w/ atm) is supposed to ask the user what movies they watched in each of the 12 months of the year and output the data to a file. After I enter the title of a movie … | |
If anyone can help me finish this and point out what had to be done to make the program work, that would be great. -ask for how many days user wants to enter from 1-365 (validate) -ask for temperature for each days between -60 and 90 degrees celsius (loop, validate) … | |
cHey guy can anyone help me to solve this question because i am begginers i am so sure to use array C++ write a program to find smallest of 30 integer using array Thanks | |
I am having trouble displaying my code that is supposed to be read in from "pgm6.txt" - it looks like it is a continuous loop, but I'm not seeing how/why/where. It's probably something oobvious that I'm just overlooking. Here is a sample of the text in my external file: *Newland … | |
Can you solve my problem? Q. Write a Program to create a object without name. Help me........... | |
Hello I am a beginner at C++ and I was given these questions to do for my homework. I would appreciate it if you could help me answer these questions. Consider the following code when answering questions 1-5 #include <iostream> using namespace std; int someVar = 10 void f(intx, int&y); … | |
Hello I'm a beginner at c++ I got these questions for homework. Would appreciate answers to these questions. Consider the following code for these questions const int NUMBER_OF_ITEMS = 5; double nums [NUMBER_OF_ITEMS]; Question 1 What is the index of the first and last element in the array? Question 2 … | |
Hey, guy I'm having some trouble with my function see below: bool tryAgain() { char answer; cout << "Do you want to enter another number? (Y/N): "; cin >> answer; answer = toupper(answer); while(answer != 'Y' || answer != 'N') { cin.clear(); cin.ignore(10, '\n'); cout << "Input invalid." << endl; … | |
Trying to output a list of all prime numbers and perfect numbers between 1 and 1000. Have been banging head against wall for past 3 hours and this is what I have so far: #include <iostream> #include <string> #include <iomanip> using namespace std; int main() { int x, aDiv, aMax, … | |
I found an error in my c++ textbook and I can't find a way around it without re-writing the author's stuff completely. An error pops up when I don't use parentheses in the expressions that I enter. "Expression: string subscript out of range" is the error. Again, this is the … | |
[QUOTE] 1. Print the following heading at the top of the output page: Miser Corporation Payroll 2. Read an unknown number of employee data records as shown below. Each group of data will contain an employee's name, hours worked, rate of page and age. A typical group of data will … | |
Hello, I'm quite stuck on how I can sell limited tickets I've put this question up before, but I haven't got the right solution.I know I should do my own project, but I really can't seem to find the solution to this.If someone can just help me with this problem … | |
Hi guys, what's up? Is native applications familiar to you? I'm right now building an anti-virus, and as you know the viruses can be active or passive, the passive is easy to remove but the active , well.... it's hard to remove but I finally found the solution is by … | |
I want to convert Wide char arrays (russian,turkey,switzerland,japanese,chinese simplified] to unsigned character array in VC++. I've tried using WideCharToMultiByte and wcstombs_s but both doesn't work. Anyone know the conversion? Thank you very much. | |
Hello I'm a beginner at c++ I got these questions for homework. Would appreciate answers to these questions. Consider the following code for these questions const int NUMBER_OF_ITEMS = 5; double nums [NUMBER_OF_ITEMS]; Question 1 What is the index of the first and last element in the array? Question 2 … | |
I am having trouble formatting my output into columns. Some of the the names are longer than others so it pushes the whole line out instead of lining up evenly. I cannot use the printf function, we haven't learned this in class yet, I'm only familiar with setw and setfill. … | |
Will you please add a button to quickly copy code inside code tags to clipboard? I find it really annoying and inconvenient to use the mouse to highlight all the code inside code tags, it was a lot easier in the vBulletin version. | |
I will try and keep this quick and simple. I want to break a loop I have by entering 'q' or something to that effect. My loop has the user enter numbers until they enter "Q" in theory. I have tried converting int's to char's and then making the loop's … |
The End.