49,757 Topics

Member Avatar for
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
166
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
88
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
192
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
170
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
489
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
174
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
Member Avatar for cessna172

[code] NODE *head; public: void push(int value){ NODE *temp = (NODE*) new NODE; temp->value = value; temp->link = head; head = temp; }//end of push. void pop(int&value) { NODE *temp = head; value = head->value; head = head->link; delete temp; }//end of pop. int is_empty(void){ return head == NULL; }//end …

Member Avatar for mrnutty
0
2K
Member Avatar for hey.howdy

[CODE] // absolute.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<iostream> #include<string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int i=0, j=0,k=0,l=0; string yes1;bool outcome;int u=0,v=0,w=0; string arr[4 ][4]={{"Name","Plot #", "Cost", "Address"}, {"john", "1121", "Rs.1000", "62 johar TOWN LAHORE"}, {"jonty", "1123", "Rs.100000", "56 …

Member Avatar for thines01
0
317
Member Avatar for hey.howdy

// absolute.cpp : Defines the entry point for the console application. // [CODE] #include "stdafx.h" #include<iostream> #include<string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int i=0, j=0,k=0,l=0; string yes1;bool outcome;int u=0,v=0,w=0; string arr[4 ][4]={{"Name","Plot #", "Cost", "Address"}, {"john", "1121", "Rs.1000", "62 johar TOWN LAHORE"}, {"jonty", "1123", "Rs.100000", "56 …

0
100
Member Avatar for mc3330418

I have to take this program and make a header file, and implementation file, and a driver file. I wrote the original code and with all of the couts int the functions I can only put one function into an implementation file. [CODE] #include <iostream> #include <iomanip> using namespace std; …

Member Avatar for Ancient Dragon
0
206
Member Avatar for johans22

//use nib in Nibbler to set nib1, nib2, nib3. How the Nibbler and ABC get more efficient to send the Nbytes in ABC?. [CODE]union ABC { unsigned char Nbytes[4]; struct { unsigned short nib1 : 4; unsigned char NA1 : 2; unsigned short nib2 : 4; unsigned short nib3 : …

Member Avatar for L7Sqr
0
71

The End.