49,761 Topics

Member Avatar for
Member Avatar for codecrypt

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 …

0
63
Member Avatar for kkb08

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 …

Member Avatar for nullptr
0
152
Member Avatar for Torf

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 …

Member Avatar for Torf
0
192
Member Avatar for itsanicole

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; …

Member Avatar for Lerner
0
380
Member Avatar for JOSheaIV

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 …

Member Avatar for JOSheaIV
0
3K
Member Avatar for lastbencher

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; } …

Member Avatar for JasonHippy
0
167
Member Avatar for caltech

**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 …

Member Avatar for Lerner
0
2K
Member Avatar for FaceSmasher

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 …

Member Avatar for ravenous
0
100
Member Avatar for shadyreal

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 <= …

Member Avatar for thines01
0
169
Member Avatar for diamondfist

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 …

Member Avatar for Alkane
0
207
Member Avatar for Hilfiger

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 …

Member Avatar for Lerner
0
111
Member Avatar for akshayinbox

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 …

Member Avatar for BobS0327
0
335
Member Avatar for khfreek

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 …

Member Avatar for Ancient Dragon
0
91
Member Avatar for initialfresh

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) …

Member Avatar for Lerner
0
195
Member Avatar for alanso

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

Member Avatar for thines01
0
171
Member Avatar for jaclynkinsey

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 …

Member Avatar for jaclynkinsey
0
167
Member Avatar for akash.doe

Can you solve my problem? Q. Write a Program to create a object without name. Help me...........

Member Avatar for thines01
0
81
Member Avatar for artan8

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); …

Member Avatar for PrimePackster
0
158
Member Avatar for artan8

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 …

Member Avatar for MandrewP
0
259
Member Avatar for while(!success)

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; …

Member Avatar for while(!success)
0
167
Member Avatar for sibwolf

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, …

Member Avatar for pheininger
0
190
Member Avatar for codemonster

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 …

0
85
Member Avatar for caltech

[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 …

Member Avatar for BobS0327
0
492
Member Avatar for KRUX17

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 …

Member Avatar for KRUX17
0
139
Member Avatar for Rasool Ahmed

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 …

Member Avatar for mitrmkar
0
702
Member Avatar for bubbleT

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.

Member Avatar for BobS0327
0
176
Member Avatar for artan8

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 …

Member Avatar for thines01
0
156
Member Avatar for mkaynutty

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. …

Member Avatar for mkaynutty
0
188
Member Avatar for Ancient Dragon

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.

Member Avatar for deceptikon
0
170
Member Avatar for rmbrown09

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 …

Member Avatar for dysrhythmia
0
131

The End.