1,426 Posted Topics

Member Avatar for stacey.rae.35

Where is the text file? If it is not the same location where you .cpp file is then you need to put the exact path to where the file is.

Member Avatar for nmakes
0
231
Member Avatar for tensity
Member Avatar for deceptikon
0
158
Member Avatar for MRehanQadri

You dont have to have it in your .h file for your derived class but you do need to included it in you .h file.

Member Avatar for MRehanQadri
0
481
Member Avatar for tanmay.majumdar2

line 76 should be b = abcd[1]; not abcd[1]=b Also the use of goto is a big no no for c++. With the loop options availible you should never need to use one. You also need to learn how to indent properly.

Member Avatar for rubberman
0
219
Member Avatar for owenransen

I would go the polymorphism route. That way if you need to add another standard latter on all you have to do is create a new derived class and add the option for the new standard.

Member Avatar for owenransen
0
199
Member Avatar for tubzz

No. It says you have to implement this with a [linked list](http://en.wikipedia.org/wiki/Linked_list).

Member Avatar for NathanOliver
0
204
Member Avatar for nah094020

What is the code that you have? You need to search through the array and find a row that has enough open seats that are together.

Member Avatar for nah094020
0
781
Member Avatar for Spanky_12

Firstly you are not using a vector but an array. You need to have the array in main and pass it to the function that takes in input and then pass it to the average function.

Member Avatar for mrnutty
0
245
Member Avatar for vizz

Check out the [win32 API](http://msdn.microsoft.com/en-us/library/windows/desktop/ff818516%28v=vs.85%29.aspx).

Member Avatar for NathanOliver
1
394
Member Avatar for nana777
Member Avatar for GeneClaude

Line 9 of you code is double rightTriangle(double x, double y) Line 25 of your code is double rightTrangle(double x, double y) Notice anything different? I'll give you a hint. Look at the name of the function.

Member Avatar for Nutster
0
441
Member Avatar for munchlaxxx

The `>>` operator leaves the newline in the buffer. You need to get rid of that before you can use `getline()` since `getline()` stops reading once it sees a newline. Check out this [guide](www.daniweb.com/software-development/cpp/threads/90228/flushing-the-input-stream) that Narue created. It should tell you how to fix your problem.

Member Avatar for NathanOliver
0
113
Member Avatar for Kangol

What do you have so far? >Create the logic for a program that prompts a user for three >numbers and stores them in an array. You need an array of size 3 and a for loop to do this >Pass the array to a method that reverses the order of …

Member Avatar for asifalizaman
0
214
Member Avatar for tformed

here is a simple brute force way of doing the nth root of a number. [code=c++] #include <iostream> using namespace std; double NthRoot(double, int); double RaisedTo(double, int); double NthRoot(double number, int nthRoot ) { bool done = false; unsigned short int digits = 0; double temp = number / 2; …

Member Avatar for vmanes
0
3K
Member Avatar for Sara Tech

If you are mixing the `>>` operator and getline you need to use `ignore()` before calling getline. Give this a try cin.ignore(); <-- added this cout << "Enter the company name: "; getline(cin, company_name);

Member Avatar for NathanOliver
0
2K
Member Avatar for CHOCHOCHO
Member Avatar for robjackstewart

if each number has a space after it you can just use the `>>` operator of the `ifstream` object your using inside of a loop.

Member Avatar for ravenous
0
966
Member Avatar for sgw

You either need to use a large number library to handle very large numbers or if you can get away with numbers less than 18,446,744,073,709,551,615 then you can use an `unsigned long long`

Member Avatar for asifalizaman
0
256
Member Avatar for Nethran
Member Avatar for Nethran
0
408
Member Avatar for farhanp

It has an error because AD didnt give you the complete code. He left part of it for you to complete. You do not need to include the string library you just need to implement the loop that AD did not put in.

Member Avatar for deceptikon
0
196
Member Avatar for James19142

Can you post the code that is giving you the problem? It is hard to read your screen from here.

Member Avatar for James19142
0
213
Member Avatar for Tujianis
Member Avatar for NathanOliver
0
151
Member Avatar for daniel1977
Member Avatar for RonalBertogi
0
248
Member Avatar for k_arjun
Member Avatar for k_arjun
0
242
Member Avatar for ankit.4aug

Well if you cant use a stringstream you could always stor the line in a string and then manually parse the string yourself. The [atoi()](http://www.cplusplus.com/reference/cstdlib/atoi/) function will convert a `char*` into the int that it represents. To get the `char*` you can use [substr()](http://www.cplusplus.com/reference/string/string/substr/) to get the number you want …

Member Avatar for tinstaafl
0
501
Member Avatar for ray.tan.507

If you want to use sizeof in your for loop you need to do it like for(int i = 0; i < sizeof(ia) / sizeof(ia[0]); i++)

Member Avatar for Nick Evan
0
206
Member Avatar for billionair

What compiler are you using? All of you includes are depreciated. It is `<iostream>` not `<iostream.h>`. Also you are inlcuding a cpp file. You never want to do that. Your student class should be defined in two files. xxxx.h and xxxx.cpp. The .h file is what you should be including …

Member Avatar for deceptikon
0
212
Member Avatar for pamela.barabutirei
Member Avatar for harry.lloyd.7503
Member Avatar for craig.durnin.1

You would want to wrap lines 10-33 in a do-while loop. int continue = 0; do { //lines 10-33 cout << "Do you want to go agian? << endl cout << "Enter 1 for yes 0 for no: "; cin >> continue; } while (continue != 0) // doing this …

Member Avatar for craig.durnin.1
0
7K
Member Avatar for mc3330418

Yes and no. It really depends on what you are trying to accomplish. If you look at the STL string it has both.

Member Avatar for mc3330418
0
146
Member Avatar for handsomelaw
Member Avatar for maham1234
Member Avatar for amalaza

What do you have so far? This smells like homework and we do not Just give you the amswer for homework. We will help you if you have a problem but that is it.

Member Avatar for amalaza
0
251
Member Avatar for VictorK19

Do you have to use 3 parallel arrays or can you use a class/struct? If you have to use the parallel array then you need to sort all of them at the same time. It would look something like this string firstNames[]; string lastNames[]; string birthDates[]; // load the array …

Member Avatar for tinstaafl
0
199
Member Avatar for xanthian23

Well if `<<` is supposed to print oput the next record untill the end then restart then you can have a member variable in you class that keeps track of what record was printed last. Then in your `<<` operator print the next record and increment the tracking variable. You …

Member Avatar for xanthian23
0
259
Member Avatar for nssrsaran

No, and that is with a capital "N". Now if you want to contract someone to do it there is a section to do that.

Member Avatar for Gonbe
0
2K
Member Avatar for beanmiester
Member Avatar for JasonHippy
0
304
Member Avatar for BARI DANIYAL

Here is a simple program for you. #include <iostream> using std::cin; using std::cout; int main() { cout << "Hello World!"; cin.get(); return 0; }

Member Avatar for NathanOliver
-1
165
Member Avatar for on93

You either need to forward declare you min function or just move it to be above the class. C++ uses a single pass compiler unlike java that uses a dual pass.

Member Avatar for Banfa
-1
570
Member Avatar for Tonyi1
Member Avatar for Tonyi1
0
354
Member Avatar for narabo

line 34 should be int * people = new int[people]; see if that makes a difference. Also on line 51 put delete [] people;

Member Avatar for Banfa
0
303
Member Avatar for dan.gerald
Member Avatar for dan.gerald
0
508
Member Avatar for awesome_cool

One takes a pointer and the other takes a reference. If you have a question you should start a new thread.

Member Avatar for NathanOliver
0
226
Member Avatar for nitin1

[Check](http://www.cplusplus.com/reference/unordered_set/unordered_set/) this out

Member Avatar for mike_2000_17
0
423
Member Avatar for MRehanQadri

Take the input in as a string. #include <string> // to use the string class #include <iostream> using namespace std; int main() { string input; cout << "Enter number: "; getline(cin, input); cout << "You entered: " << input << endl; cin.get(); // pause program return 0; }

Member Avatar for Ancient Dragon
0
194
Member Avatar for isrinc

Well I cant tell anything from this. What line is causing the problem? I am not seeing a call to `delete []` anywhere in this function for `RO` or `IO`.

Member Avatar for Ancient Dragon
0
276
Member Avatar for A Haunted Army

This is how I would format your code. void b_Physics::Collision(const s_Polygon& Obstruct) { float Ntime = 0.0f; s_Polygon Polygon = this->Object.Polygon; switch(this->Object.Motion.HorizDir) { case s_Motion::LEFT: Polygon.MinX = Polygon.MinX + this->Object.Motion.Xvel; break; case s_Motion::RIGHT: Polygon.MaxX = Polygon.MaxX + this->Object.Motion.Xvel; break; default : break; } if(this->Object.Polygon.MinY < Obstruct.MaxY && this->Object.Polygon.MaxY > Obstruct.MinY) …

Member Avatar for A Haunted Army
3
265
Member Avatar for ConfusedLearner

You can't have 2 main functions in one program. You either need to make 2 seperate programs or add the addition function to the first main function and get rid of the second one.

Member Avatar for deceptikon
0
115
Member Avatar for TexasJr

You are mixing input with `getline()` and `cin`. iIf you are going to do that then you need to [flush the input stream ](http://www.daniweb.com/software-development/cpp/threads/90228/flushing-the-input-stream) after the call to `getline()` and before you call `cin >>`.

Member Avatar for NathanOliver
0
251

The End.