1,426 Posted Topics

Member Avatar for Nikolas9896
Member Avatar for yaldoo

arrySize = 1; for(int i = 0; !scorFil.eof(); i++ && arrySize++)//for loop for the readable file, collect the scores { //the array size is incremented as well scorFil >> score; arry[i] = score; } Becomes arrySize = 0; int i = 0; while(scorFil >> score) { arry[i++] = score; arrySize++; …

Member Avatar for David W
0
2K
Member Avatar for cambalinho
Member Avatar for cambalinho
0
1K
Member Avatar for nathan.pavlovsky

Without running your code the one thing that sticks out to me is for (forwardTIterator=theRef.cbegin(), backwardTIterator=(theRef.crbegin()+1); forwardTIterator!=theRef.cend(); forwardTIterator++,backwardTIterator++) Why are you using `backwardTIterator=(theRef.crbegin()+1)`? Shouldn't it be `backwardTIterator= theRef.crbegin()` since `crbegin()` points to the last element of the container. [Here](http://www.cplusplus.com/reference/vector/vector/crbegin/) is a good link for `crbegin()`. It is for vectors but …

Member Avatar for NathanOliver
0
1K
Member Avatar for Ben_7

That's not a question. What is your question? We only give homework kelp to those that show effort.

Member Avatar for rubberman
0
242
Member Avatar for EarhawkPH

What is the code that you have and what is the error the compiler is giving you?

Member Avatar for Lucaci Andrew
0
166
Member Avatar for yaldoo

Well if you assume that no name has a number in it then to find the social in the line you would do `size_t spot = line.find_first_of("0123456789")`. Once you have that you can erase the social from the string and then insert into it `"XXX-XX-XXXX"`. After that you would have …

Member Avatar for NathanOliver
0
4K
Member Avatar for nathan.pavlovsky

Well you are calling `getline` and `get` so you need to hit enter twice. What is the purpose of using `cin.get()` in your if statement? getline will toss it out so there would be nothing there.

Member Avatar for nathan.pavlovsky
0
2K
Member Avatar for jlieu.ww

What do you have so far? We only give homework help to those that show effort.

Member Avatar for NathanOliver
0
220
Member Avatar for newbiewwcode

Make the access for all of the class members public in the nested class and declare the nested class in the private part of the main class. this way you can access the members directly but only from within a function of the main class. If you don't want the …

Member Avatar for NathanOliver
0
134
Member Avatar for yaldoo

With arrays I am in favor of having the caller suppling the 1d array to the function. That way the caller knows they are responsible for the array. It's a shame that dont just start of with using the STL and after they are comfortable with it teach them how …

Member Avatar for NathanOliver
0
2K
Member Avatar for newbiewwcode

You need another class. You should have a school class that has a vector of classrooms. The classroom class should hold on to what floor and room number it is. It should also have a vector of students that will hold all of the students that are in that classroom.

Member Avatar for tinstaafl
0
699
Member Avatar for nathan.pavlovsky

change line 18 `HardwareRecord(int=0,std::string="",std::string="",double=0.);` to `HardwareRecord(int account=0,string name="",string description="", double price=0.0);`. That should fix it.

Member Avatar for nathan.pavlovsky
0
20K
Member Avatar for Andy90

cout<<" Inode number: "<< sb.st_ino; You only need the long if you want it explicitly cast to a long. If you do want to cast and you want the code to be c++ then you could do this: cout<<" Inode number: "<< static_cast<long>(sb.st_ino);

Member Avatar for NathanOliver
0
223
Member Avatar for yaldoo

You can use `cout` to debug. Just output parts that are questionable or you are not sure what the value is. You don't need to actually step through a debugger to debug code.

Member Avatar for yaldoo
0
6K
Member Avatar for KArisma04
Member Avatar for صمتي
Member Avatar for m.a.u.

I would take a look at [this](http://www.mono-project.com/Main_Page). I have reads some review though that call this a second class citizen compared to MS C#

Member Avatar for NathanOliver
0
217
Member Avatar for ABELLOVE

if (!(assignment == complete)) if (today > dueDate) return failure; else output << "Get working on your code. We only give help to those that show effort and code!!"

Member Avatar for NathanOliver
-2
126
Member Avatar for Learner010
Member Avatar for whitebloodcell

I have a questions for you. Why does `Players` have a size of 1000 when you only need 128?. If you post the full code I can step through it with my debugger and see what is going on.

Member Avatar for David W
0
278
Member Avatar for Learner010

I would read in the entire line and then break it up. string line; int total = 0; ifstream fin("file.txt"); while (getline(fin, line)) // get the line { // loop by three for (size_t i = 0; i < line.size() i += 3) total += atoi(line.substr(i, 3).c_str()); // get the …

Member Avatar for NathanOliver
0
384
Member Avatar for FireSBurnsmuP

there is a feature in vista that will use a usb jump drive as a sort of ram but this is very slow. maybe a better way would to use an esata connection to some flash based memory. just a thought

Member Avatar for Hiroshe
0
634
Member Avatar for asia_6969

Change while(std::getline(fin,line)) { for(i=0;i<line.length();i++) { line.substr(0,'32'); } cout<<line<<endl; } To while(std::getline(fin,line)) cout << line.substr(0, line.find_first_of(" ", 0)) << endl

Member Avatar for NathanOliver
0
4K
Member Avatar for Auroch

`ifstream in("TEST.dat");` on lines 49 and 70 needs to be just one decleration done before the switch statement.

Member Avatar for Auroch
0
986
Member Avatar for irfan_3

Hate to burst your bubble but according to your guidelines you are to late to submitt this. What kind of idea do you need to start this? The sheet gave you three references you could use as a basis for your project.

Member Avatar for irfan_3
0
1K
Member Avatar for shelton22

Given SPLINKS contains: 1 3 4 abcmap contains; 1=> 1 2=> 2 6 3=> 1 2 4 What should the results be when the operation is finished? Maybe this? SPLINKS contains: 1 4 abcmap contains; 1=> 1 2=> 3=> 1 4

Member Avatar for shelton22
0
279
Member Avatar for Patel_Ankit

No. We dont just give code. show us what code you have and what is wron with it and we can help you with that.

Member Avatar for iamthwee
0
273
Member Avatar for Awais ramzan

What do you have so far? Do you know what a pointer is? We only help people that show effort. If you dont show your code you dont get code.

Member Avatar for Learner010
0
153
Member Avatar for smitsky

If you are going a comparision which i think you are since you are returning a bool you need to change this: bool operator=( const PCB& other ) { return other.getTau() = this->getTau(); } To bool operator ==( const PCB& other ) { return other.getTau() == this->getTau(); }

Member Avatar for uonsin
0
348
Member Avatar for asia_6969

I would think you should be able to do this. I have not tested this. // main always returns an int so dont forget to change this int main() { std::stringstream ss; std::string line; std::fstream fin("somefile.txt"); std::vector<int> numbers; // read each line from the file while(std::getline(fin, line) { std::string temp; …

Member Avatar for Ancient Dragon
0
396
Member Avatar for shumaila akbar

They are for getting input and pushing out output. cin is a input stream object and if you use `cin >> someVariable` you can think of it as from cin put value into someVariable. cout is a output stream and when you write `cout << someVariable` you can think of …

Member Avatar for Vikram Sehgal
0
154
Member Avatar for JOLO14
Member Avatar for OM3NN

What have you done so far? What part of the problem dont you understand? You have to put in an effort if you want help.

Member Avatar for pritaeas
0
250
Member Avatar for shelton22

If all you want to do is to change the zeros in a column to 99 if all of he arrays have a zero in that column then you can do the following. this is psudeo code so it wont compile. for i = 0 until i < arraysize { …

Member Avatar for iamthwee
0
510
Member Avatar for XodoX

if you have a compiler that support c++11 check [this](http://www.cplusplus.com/reference/chrono/high_resolution_clock/now/) out. It will show you how to use the high resolution clock available in c++11.

Member Avatar for NathanOliver
0
263
Member Avatar for programmerUSM

Well you have a couple ways to approach this. If all of the forms connect back to a central server then the server can hold on to the reference number and everytime a new form is open it would increment the number by one. This way every form has a …

Member Avatar for programmerUSM
0
186
Member Avatar for Jsplinter

You need a destructor for `MyCon` that frees the memory. Something like this should work. ~MyCon() { delete [] matA delete [] matB }

Member Avatar for JasonHippy
0
729
Member Avatar for rashad fares

What is your definition of a digit? A number is a digit or is made of digits so I'm not sure what you are talking about.

Member Avatar for Ancient Dragon
0
155
Member Avatar for glao

If you want the time of the run of the inner loop for every iteration of the out loop you should be able to do this //... std::vector<std::pair<clock_t, clock_t>> loopTimes for (int i = 0; i < N; i++) { cloct_t begin = clock(); for (int j = 0; j …

Member Avatar for Suzie999
0
456
Member Avatar for lena1990

Download the file called "ekiga-4.0.1.tar.xz". It is a tarball compressed with xz looseless file compression. in windows you can open it with 7-zip.

Member Avatar for lena1990
0
315
Member Avatar for Rubinder singh

MSVC++ is mostly standard compliant. I say mostly because it doesnt have all of the C++11 features. It's C++98/03 compliance is pretty good.

Member Avatar for vmanes
0
3K
Member Avatar for Praveen_10

What part of the code dont you understand? Did you write this code? You should also look into indenting your code properly. The way you have it now makes it very hard to read. If I wrote this code it would look like this: #include <iostream> using namespace std; int …

Member Avatar for nullptr
0
205
Member Avatar for nhiap6

Did you already ask this [here](http://www.daniweb.com/software-development/cpp/threads/477478/why-us-c-better-for-system-programming-than-java)? Schol-R-LEA and mike_2000_17 did a really go job explaining in that post.

Member Avatar for NathanOliver
0
187
Member Avatar for Jake_4

On line 32 you have `value = amp*sin(2*pi*freq*t)`. `value` is a `float *` so assigning `amp*sin(2*pi*freq*t)` to value makes no sense because `value` is a pointer which is an integer number. Now if you want to store the return into the `float` that `value` points to you need to do …

Member Avatar for StuXYZ
0
4K
Member Avatar for jonsee
Member Avatar for shurooqalhodar
Re: help

So what part are you having a problem with? We will not do your homework for you. Just posting the assignment without anything else is not the way things work on this site.

Member Avatar for Kristian_2
0
106
Member Avatar for ckide

Yes Java is multi-platform but that can misleading as well. Different java runtimes can produce different behavior. If you use something from a newer version of Java it might not work on some machines running an older runtime. I ran into this in my Java class.

Member Avatar for invadev
0
310
Member Avatar for newbiewwcode

You would need some sort of arbitrary precision library. [The GNU MP Bignum Library](https://gmplib.org/) is pretty good.

Member Avatar for Ancient Dragon
0
365
Member Avatar for saja.omarii.7

Nevermind. Deceptikon you beat me to it. I will say that you can make this work for sentences with more then 3 words using stringstreams and a vector.

Member Avatar for saja.omarii.7
0
4K

The End.