1,426 Posted Topics

Member Avatar for Hey90

Is the error reffering to line 85 in shoes.cpp? I am not seeing anything wrong with the code.

Member Avatar for deceptikon
0
439
Member Avatar for Hey90
Member Avatar for lewashby

@ vmanes Shouldnt line 10 of your snippet be dest[index] = '\0'; // null terminate the destination string

Member Avatar for vmanes
0
77
Member Avatar for trantran

I am running Windows 7 and if I need another OS I use VMWare player to run the different OS. Once it is running I normally RDP into it for a cleaner look and feel

Member Avatar for trantran
1
314
Member Avatar for dreday92

This const Vector& operator=(const Vector &rhs); Should be const Vector<T>& operator=(const Vector<T> &rhs); And then in you implementation this Vector<T>:: const operator=(const Vector &rhs) should be const Vector<T>&::operator=(const Vector<T> &rhs)

Member Avatar for dreday92
0
521
Member Avatar for lewashby
Member Avatar for can-mohan

You have not overloaded the `=` operator. You need to do that as well when working with pointers. you should implement it like your copy constructor. What compiler/IDE are you using? I ask because the headers you have are not correct. Also have you thought about using the string class …

Member Avatar for remunance
0
440
Member Avatar for swiss21

So what have you done? If this is the code the teacher gave have you modified it at all? Also please repost it so it is not all on 2 lines. I am not sure if anyone is going to be willing to help you without properly formated code.

Member Avatar for NathanOliver
-3
206
Member Avatar for VernonDozier

correct me if I am wrong and since I dont have my compiler in front of me I might be. If you have `c = a * b`, then can't you just do a check after the mulitplication for `c / a == b`? If `c` overflows it should break. …

Member Avatar for deceptikon
0
176
Member Avatar for eric.i.perez

@ luicaci Andrew to make your isPrime function a little faster you can do this bool isPrime(int nr) { if (nr == 0 || nr == 1) return false; if (nr % 2 == 0 && nr != 2) // check to see if its even return false for (int …

Member Avatar for NathanOliver
0
145
Member Avatar for silvera
Member Avatar for cucumalay

>For this assignment your are to write a program, using strings (from the string class) that plays the popular game of Hangman. Well you might want to switch over all of your char arrays to string like the instructions tell you to use. Might make the rest of the code …

Member Avatar for NathanOliver
0
149
Member Avatar for abbashadwan
Member Avatar for nitin1

Give [this](http://www.cplusplus.com/reference/string/string/) link a try to see what a string can do. >The string object even gives you a function enabling you to pretend it is just an array of char, in case you're stuck with a function that wants an array of char instead of a proper string object. …

Member Avatar for Lucaci Andrew
0
211
Member Avatar for Petcheco

you might want to look into the [Sieve of Eratosthenes](http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes)

Member Avatar for Petcheco
0
207
Member Avatar for shaguftakhan

What seams to be the problem? if you need to know how to calculate the area of a trapezoid look at [this](http://en.wikipedia.org/wiki/Trapezoid).

Member Avatar for NathanOliver
-1
120
Member Avatar for daniel1977

Do you have the == operator overloaded for the `extPersonType`? Remove needs to have that defined in order for it to work.

Member Avatar for NathanOliver
0
144
Member Avatar for ztdep
Member Avatar for uzair.tabassumwahla
Member Avatar for lewashby

I think he copied the return statement and forgot to remove the semicolon after changing it to an if. Not sure why he would do that but hey.

Member Avatar for lewashby
0
198
Member Avatar for Hopp3r

@ Suzie999 the OP also said this >However one of the functions doesn't have a length passed with the other parameters! >char arrayX(char a[], char v) >Where you are asked to find amount of times value (v) is in the array. He is trying to write a function to deal …

Member Avatar for NathanOliver
0
2K
Member Avatar for mattster

Are you trying to run the exe file and getting this error? You might need to have the dll in the folder the exe file is in.

Member Avatar for mattster
0
292
Member Avatar for Doogledude123

Hate to but in but to answer your question Suzie999 your first post neglected the fact that mapReader is a stream object and he is trying to put information from the stream into an uninitialized pointer array. Your second post wouldn’t work either since he is trying to read in …

Member Avatar for Doogledude123
0
283
Member Avatar for deceptikon

After reading that wiki link you provided I am not a big fan. In order for it to work the person using it will need to know the internals of the class to know what to pass. To me this harms encapsulation. I dont think I'll be using it unless …

Member Avatar for vijayan121
0
428
Member Avatar for victor tawiah
Member Avatar for Suzie999

As far as i know there isnt a backup of the file. You might be able to get away with restoring the file windows if you have Shadow copy turned on? What OS are you using?

Member Avatar for Suzie999
0
163
Member Avatar for glenwill101

To display it should look like this std::map<std::string, double> milesto; // load milesto for(std::map<std::string, double>::iterator itr = milesto.begin(); itr != milesto.end(); ++itr) { std::cout << itr->first << "\t" << itr->second << std::endl; } Also notice how I used `++itr` instead of `itr++`. Using the preincrement operator will make the code …

Member Avatar for glenwill101
0
3K
Member Avatar for lewashby

line 9 should be std::cout << "You entered" << date; You only need to call cout once.

Member Avatar for CGSMCMLXXV
0
91
Member Avatar for sciwizeh

Could you get away by just having a stringstream object in your tokenizer class? What other functionality does PushbackReader offer?

Member Avatar for vijayan121
0
2K
Member Avatar for memo0o

main.cpp:6:19: conio.h: No such file or directory ----You dont have conio.h on you computer. main.cpp: In function int main()': main.cpp:54: error:m' undeclared (first use this function) ----What is m on line 54? main.cpp:54: error: (Each undeclared identifier is reported only once for each function it appears in.) main.cpp:55: error: expected …

Member Avatar for ravenous
0
205
Member Avatar for ro7_ad

This is already in c++. What do you want to convert it to? There are a couple errors in this. Line 2 and line 70 are wrong.

Member Avatar for NathanOliver
0
453
Member Avatar for nitin1

In return (key < str.key); `key` belongs to the object being used and `str.key` is from the object passed to the function. You could also write it like this if it makes more sense to you: return (this->key < str.key);

Member Avatar for NathanOliver
0
226
Member Avatar for nullifyQQ

`returnListOfAddresses()` should look like this: for(int t=0; t<(int)addressBook.size(); t++) { cout<<addressBook[t]->toString(); }

Member Avatar for Nick Evan
0
939
Member Avatar for FtKShadow

In your second if statement you are saying [icode] if (num < die) [/icode]. what would happen if I guessed 5 and the die was 2? A better way would be to do [icode] if (num != die) [/icode].

Member Avatar for StefanRafa0
0
3K
Member Avatar for markwiering

You are still calling main in your if statements to get back to the top of your code. This should NEVER be done. Main is to be called by the OS not the program. You need to rethink your approach so you dont have to call main to get back …

Member Avatar for innocentmeshi
0
479
Member Avatar for Zaina jee
Member Avatar for tomz6

The string type is not a built in type. Strings are objects made from a class. The only native type that can hold a string is a char array. The standard for c++ says that main must look like one of these three options. int main(); int main(int argc, char …

Member Avatar for ahmedhamdy
0
587
Member Avatar for vishalonne
Member Avatar for iamthesgt
Member Avatar for theguitarist
0
529
Member Avatar for myk45

I could be mistaken but if you have a quad core processor you should be able to run 4 threads at the same time. With the way you have your code written right now you start all 100 threads and then right after that you call each thread and wait …

Member Avatar for myk45
0
739
Member Avatar for proprogrammer

int arr[] = {1,2,3,4,5,6,7,8,9}; // array of numbers list numberList(arr, arr + sizeof(arr) / sizeof(int)) load array into list with constructor

Member Avatar for NathanOliver
0
77
Member Avatar for Alexkid
Member Avatar for prahesh

What is the hangup? Change line 17 to `std::multimap<std::string, PoiDetails> vName;` and change line 34 to `std::multimap<std::string, PoiDetails>::iterator it;`. That should be all you need to do.

Member Avatar for NathanOliver
0
197
Member Avatar for TheBrick

Since the set holds a vector you need to add a second for loop inside your first for loop. In this second loop you need to print out each element of the vector since the vector does not overload the << operator.

Member Avatar for TheBrick
0
237
Member Avatar for ayieye
Member Avatar for pjh-10

On line 38 you have x= pow(cos(lat2)*sin(longz),2.0) + pow((cos(lat1)*sin(lat2))/*<--no exponent*/ - sin(lat1)*cos(lat2)*cos(longz),2.0); The second pow function has no exponent.

Member Avatar for pjh-10
0
166
Member Avatar for marnun

I had thought to tell him that but the problem states to print the numbers in the order they appear. If his compiler supports c++11 he could use an unordered map and use the value for the key.

Member Avatar for marnun
0
267
Member Avatar for cortland.boudreau

you need to make sure you are in the bounds of the array before you call `getOrganism()`. You could also add some coe to you `getOrganism()` function and have it check to see if the posistion asked for is within the array. If it is not then it should return …

Member Avatar for cortland.boudreau
0
127
Member Avatar for t2nator

All mergre sorts I have seen that deal with recusrion use the split in the middle method. Is this a recursive merge sort or are the doing an iterative merge sort?

Member Avatar for NathanOliver
0
140
Member Avatar for yheenzie.saldivar

What do you have so far? We do not give out the answers to homework problems. You need to show effort before we help.

Member Avatar for clubberlangMayo
0
97

The End.