• Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in looking for some help with underclared code thanks.

    Thank you Mike. As always I appreciate your contributions.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Wrapper Classes

    Well when you make a wrapper class you are basically redoing the public facing side of the class. Lets say the class has a bunch of everloads that you never …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in looking for some help with underclared code thanks.

    Can I ask what `char *strerror(num) int num;` means? I have never seen a function declared like that before.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in smple malware using dev c++

    Someone probably can but you need to start your own thread and explain show the code that you have and what part you are having trouble with.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in beginning

    `<cmath>` is the c standard math library. You would need to included it when you want to use the standard math function. [Here](http://www.cplusplus.com/reference/cmath/) is a list of all the functions …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Problems with my menu. Please read description

    When you do: cout << "enter some information: "; cin >> choice; And the users enters `1` then what actually goes into the stream is `"1\n"` and `cin >> choice` …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Problems with my menu. Please read description

    Here is your corrected code. I commented what I changed. #include <iostream> #include <fstream> #include <string> #include <vector> #include <cstdlib> using namespace std; void collegesUniversities() { ifstream campuses; campuses.open("colleges.txt"); vector<string> …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Problems with my menu. Please read description

    Change line 29 `if(temp == schoolVector[i])` to `if(schools == schoolVector[i])` since `schools` is what you ask the user for. `temp` is just what was last read from the file.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Find Smallest Number In Array Of Random Numbers

    Post the code that you have now.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Problems with my menu. Please read description

    You should be using a different string to read from the file. You are overwriting schools with what is in the file. This: while(getline(campuses,schools, '\n')) { schoolVector.push_back(schools); } Should be …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in QUEUES ...

    That's because you have a newline floating in the input buffer from line 32. To get rid of the newline in the buffer you can just put `cin.get()` after line …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Reading CSV file correctly

    It is really weird that the lines with the text at the end don't have a coma where the lines with a number do. Since you do not need the …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in the lowest non zero degit value of n !

    Well first off you need to write a function to compute `x!`. `!` means [factorial](http://en.wikipedia.org/wiki/Factorial) in math. Once you compute the factorial of the number then you need to go …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Reading CSV file correctly

    Can you paste about 10 lines or so from the file into here. Does every column value have a "," after it or does each line end with a newline? …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in string of expression

    Since it was assigned to you maybe you should write it.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in rounded to four decimal digits?

    Well you can make your own rounding function or you could use [setpercision](http://www.cplusplus.com/reference/iomanip/setprecision/)
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Const methods to read private data members of a class

    You are trashing our memory in your `Sport::Add()` function. You are adding a local variable to an array of pointers on line 222 which I believe is causing your issues. …
  • Member Avatar for NathanOliver
    NathanOliver

    Gave Reputation to vijayan121 in Listing files in folder - WCHAR problem

    The Microsoft implementation includes the draft TR2 filesystem library. (With other compilers, `boost::filesystem` which privides like functionality can be used.) #include <iostream> #include <string> #include <vector> #include <filesystem> namespace fs …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Blackboard messaging

    It seams to me the blackboard needs to store the message along with the user who posted it. Then the subscribers will hold a list of the users they are …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in ABC Loans Company

    A) You are in the wrong formum >Write an interactive program in C B) You didn't read the [rules](https://www.daniweb.com/community/rules) or you ignored them.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in error C2679: binary '+' : no operator found which takes a right-hand operan

    You can use the following to convet from `System::String^` to `std:string` #include <msclr/marshal_cppstd.h> System::String^ xyz="Hi boys"; std::string converted_xyz=msclr::interop::marshal_as< std::string >( xyz);
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in error C2679: binary '+' : no operator found which takes a right-hand operan

    I have already told you. You need to convert the int's into strings. there is no built in support for integer and string concatenation. If you can use a string …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in error C2679: binary '+' : no operator found which takes a right-hand operan

    You need to make everything a string. You can not have `"some text" + int + string + "some text"`. Also according to the MSDN `SqlCommand()` takes a `String` not …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in error C2679: binary '+' : no operator found which takes a right-hand operan

    They need to be strings in order to combine them with a string. The compiler is complaining that there is no `+` operator that takes an int and a string
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in error C2679: binary '+' : no operator found which takes a right-hand operan

    What are `empid_` and `phone_`? Are they strings? If not they need to be.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Solve quadratic equation

    ddnabe that price is a little steep. Since he is new couldn't you cut him some slack and only charge $99,999.95?
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Beginner's Tutorial On Functions

    Yes. That function returns the largest of x, y, and z.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in converting char into string in c++

    string's operator `==` can take a `string` and a `char` so all you have to do is: i=0; while(i<23){ c = char(i) //convert c which is a character into string …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Question about optimization and better aproach

    I would use the container availible in the STL for this. I would think some sort of map would be best for this.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Question about optimization and better aproach

    What exactly is the purpose of this? You are just trying to make a symbol table? Have you thought about using a [map](http://www.cplusplus.com/reference/map/map/)?
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in letter pair analysis

    So what do you have so far? What are you stuck on.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Cyclic dependency in classes

    Thanks for the guideline Mike. You are informative as always.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Running total in a .txt file

    step through the code with the debugger or use cout statements and oupt what is happening so you know what is going. Debugging is an important skill to learn.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Running total in a .txt file

    move line 28 outside of the loop.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Running total in a .txt file

    In line 30 you are using 2 delimiters. I dont think that will work. What happenes if you just have `'/n`?
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Running total in a .txt file

    Here is a better example for you. //... std::string type; int count; int candyTotal = 0; int costumesTotal = 0; int decorationsTotal = 0; std::ifstream fin("myfile.txt"); // open file while …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Cyclic dependency in classes

    First I want to apologize for `#included` instead of `#include`. I am not sure why I did that. Secondly when dealing with an incomplete type which is what a forward …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Cyclic dependency in classes

    you have to use forward declarations and pointers. A.h #ifndef A_H #define A_H class B; class A { private: B* bclass; public: //... }; #endif A.cpp #included "A.h" #included "B.h" …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Running total in a .txt file

    type is just a name for what the sales type is in the file. Every time you loop through readin the file you need to read 2 lines. You need …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Running total in a .txt file

    If you know what all of the types are then youcould do something like the folowing while getting records from the file if type == candy add amount to candy …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in C++ Random Numbers

    using standard code you could do the following char choice; do { // your code goes here std::cout << "Do you want to go again (y/n): "; std::cin.get(choice); } while …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in SDL keypresses and image optimization

    What is the code you added that broke it?
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in ifstream?

    `ifstream` is a class that is used for reading files. `file_in` is an object of the class `ifstream` and it is used in the program to read from a file. …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Simple Data Base that saves Data in Files.

    Okay. Why dont you do that then?
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in functions

    So what do you have so far? No one is going to do you homeworkfor you.
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Accelerated C++ questions about an exercise

    This is not a critique of your code but a way to make it look a little better. In your `SplitBySpace` function you can make it a lot simpler by …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in searching vector with maps

    You could use [regular expressions](http://www.cplusplus.com/reference/regex/)
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in oop I'm not getting

    What book are you using if I might ask. It might just be that you need a better book. Book* pA = new Book("Aardvark", "Be an Aardvark on pennies a …
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in Scrabble

    coat
  • Member Avatar for NathanOliver
    NathanOliver

    Replied To a Post in C++ Code for simple age calculator

    @takuya17 - Please don't resurrect dead threads with something completely unrelated. If you want to contract a coding job you need to do so under the Jobs and resumes section …

The End.