• Member Avatar for David W
    David W

    Replied To a Post in Split String

    You might like to use some C++ library functions to assist parsing a line ... http://developers-heaven.net/forum/index.php/topic,2019.msg2682.html#msg2682
  • Member Avatar for David W
    David W

    Replied To a Post in File Handling+Operator Overloading

    See what you can code to take in data from a keyboard user (with suitable prompts) that could replace the code that takes in data from a data file.
  • Member Avatar for David W
    David W

    Replied To a Post in File Handling+Operator Overloading

    Opps ... (typo fixed) And instead of these includes : #include <iostream> #include <iomanip> #include <fstream> #include <string> Have these : #include <iostream> #include <iomanip> #include <fstream> #include <string> #include …
  • Member Avatar for David W
    David W

    Replied To a Post in File Handling+Operator Overloading

    You seem to have found the BP (Blood Presure) example program ok at the link I provided above ... But ... note HINT! If you read the (embedded) comments in …
  • Member Avatar for David W
    David W

    Began Watching robot

    a robot is programmed to move forward 'F' meters and backwards again say 'B' meters in a straight line .the robt covers 1 meter in T units of time on …
  • Member Avatar for David W
    David W

    Replied To a Post in robot

    >This is not actually a programming question (or rather, to solve this by simulating the behaviour of the robot is a bad way to solve this). This is a simple …
  • Member Avatar for David W
    David W

    Replied To a Post in File Handling+Operator Overloading

    > It also means that this code is many years out of date. Since C++11, there is an ifstream constructor that simply takes an object of type std::string Unfortunately, it …
  • Member Avatar for David W
    David W

    Began Watching h.w plzz help me

    Write a C++ program to help a cashier person when returning change to the customer. Your program should read two real numbers: the amount of required money and the amount …
  • Member Avatar for David W
    David W

    Replied To a Post in h.w plzz help me

    Can you code a C++ program that prints a message to ask for input? (Hint: look up: C++ cout) Can you code to take in a number? (Hint: look up: …
  • Member Avatar for David W
    David W

    Began Watching gcc & g++ debugging options

    [Linux] When using gcc and or g++ is there a way I can have two output files, one with and one without debugging symbols in one gcc/++ command? I don't …
  • Member Avatar for David W
    David W

    Replied To a Post in gcc & g++ debugging options

    Write a batch file to handle this ... then call that batch file.
  • Member Avatar for David W
    David W

    Began Watching Working With PDF files

    At my current job me and the rest of the staff that work in my area are uisng a lot of files that when opened look like PDF files but …
  • Member Avatar for David W
    David W

    Replied To a Post in Working With PDF files

    Did you google for pdf file format? But ... since the software you were using is NOT supported any longer ... why not write your own data input forms?
  • Member Avatar for David W
    David W

    Began Watching Where to get started with an advanced databse

    Okay so let me start by saying I have a pretty decent c++ base and very advanced logic skills. So whatever help you will have to provide will probably be …
  • Member Avatar for David W
    David W

    Replied To a Post in Where to get started with an advanced databse

    Can you export your data base from Oracle to a spreadsheet like Excel ... as a csv file ... or csv files ? If so, then you can easily code …
  • Member Avatar for David W
    David W

    Began Watching open file table

    How do you implement the open/close system calls on linux using C? What go's into the open file table? How do you create file's and delete file's?
  • Member Avatar for David W
    David W

    Replied To a Post in open file table

    In standard C you can create files ... http://www.cplusplus.com/reference/cstdio/FILE/ http://www.cplusplus.com/reference/cstdio/fopen/ But ... I do not think there is *a standard way* to delete a file.
  • Member Avatar for David W
    David W

    Began Watching Declaration Syntax Error

    #include<iostream.h> #include<conio.h> int main(void) { void hello() { cout<<"HI"; } getch(); return 0; } I am getting an error at line 6 stating that declarartion syntax error. What do I …
  • Member Avatar for David W
    David W

    Replied To a Post in Declaration Syntax Error

    1) Get an up to date compiler (many are free like this one: http://sourceforge.net/projects/orwelldevcpp/ 2) Do not use conio.h ... or getche ... to keep code portable 3) Define your …
  • Member Avatar for David W
    David W

    Began Watching File Handling+Operator Overloading

    Question is: Create a class Employee with following constraints in mind: 1. Declare three private data members named id,name,NIC of int,string,long respectively. 2. Overload stream insertion and stream extraction operators. …
  • Member Avatar for David W
    David W

    Replied To a Post in File Handling+Operator Overloading

    If you were to google C++ file read / write you could find many code examples and articles to help ... ( also re. overloaded << and overloaded >> ) …
  • Member Avatar for David W
    David W

    Replied To a Post in Help with Lab in C programming

    As suggested above, this type of data record processing problem is handled much more easily and cleanly ... by using a C struct (a data record) and a readily expandable …
  • Member Avatar for David W
    David W

    Began Watching Exception Handling

    I'm working on exception handling. Here is my code, I need some help.. Requirements: => If the user push a value to stack when stack is full,it must throw an …
  • Member Avatar for David W
    David W

    Replied To a Post in Exception Handling

    Your Dev IDE settings ... permit your code to be compiled using one of these standards ... ISO C90 <--- this is what I normally choose when compiling C student …
  • Member Avatar for David W
    David W

    Stopped Watching Exception Handling

    I'm working on exception handling. Here is my code, I need some help.. Requirements: => If the user push a value to stack when stack is full,it must throw an …
  • Member Avatar for David W
    David W

    Replied To a Post in Exception Handling

    Since I have not heard further ... I presume you have 'the example' working ok? Here is a little upgrade to demo the ease of editing that code to a …
  • Member Avatar for David W
    David W

    Replied To a Post in Exception Handling

    re. 2) tools compiler options settings code generation compile width ... pointer width ... select 64 bit re. 1) tools compiler options settings code generation language standard ... select either …
  • Member Avatar for David W
    David W

    Replied To a Post in Exception Handling

    With your Dev compiler ... 1) make sure you HAVE pre-set ... to compile as C++ 11 2) make sure the pointer width is 64 bit 3) make sure to …
  • Member Avatar for David W
    David W

    Began Watching Help with Lab in C programming

    Instruction: You must use pointers for this lab. No arrays, no structures. For example, if you need an array of floats to hold the scores, do not use float score[15]. …
  • Member Avatar for David W
    David W

    Replied To a Post in Help with Lab in C programming

    This 'question' may be a little 'stale' by now, but an edit/fix of the OP's code, may serve as a demo for other C students who stop in at Dani's …
  • Member Avatar for David W
    David W

    Began Watching undefined reference to ?

    I have four files in c++ 1. BankAccount.h 2. BankDatabase.h 3. Main.cpp BankAccount.h #include <string> class BankAccount { public: BankAccount(int accNumber,const std::string& accName); void setAccNumber(const int accNumber); int getAccNumber() const; …
  • Member Avatar for David W
    David W

    Replied To a Post in undefined reference to ?

    Did you see the other post with fixes/edits to your code ? Please mark that (primary post) as 'solved' ... and in the future, please try to avoid 'duplicate posts' …
  • Member Avatar for David W
    David W

    Began Watching File parsing for specific strings and extract data

    Hi, I am using the below program to parse a file ,extarct values and store them into an array. Here i have same values repeated for example IP , so …
  • Member Avatar for David W
    David W

    Replied To a Post in File parsing for specific strings and extract data

    You may like to see this ... (uses some freely available custom C utility files ... so see the comments for links to files needed in the example program.) /* …
  • Member Avatar for David W
    David W

    Began Watching Exception Handling

    I'm working on exception handling. Here is my code, I need some help.. Requirements: => If the user push a value to stack when stack is full,it must throw an …
  • Member Avatar for David W
    David W

    Replied To a Post in Exception Handling

    Since you have supplied the most part of the code ... you might like to see this little further 'edit' that might help you to continue ... Edit: use a …
  • Member Avatar for David W
    David W

    Began Watching invalid conversion from ‘const char*’ to ‘int’**

    I have four files in c++ 1. BankAccount.h 2. BankDatabase.h 3. Main.cpp //BankAccount.h #include <string> class BankAccount { public: BankAccount(int accNumber,const std::string& accName); void setAccNumber(const int accNumber); int getAccNumber() const; …
  • Member Avatar for David W
    David W

    Replied To a Post in invalid conversion from ‘const char*’ to ‘int’**

    You may like some fixes/edits ... as per the following 3 files: file 1: // BankAccount.h // #include <string> class BankAccount { public: BankAccount( const int accNumber, const std::string& accName …
  • Member Avatar for David W
    David W

    Replied To a Post in programming

    Opps in avove ... (forgot this was C forum) C code could be like this: if( fin ) { char str1[132], str2[132]; int intVal = 0; while( fscanf( fin, "%s …
  • Member Avatar for David W
    David W

    Began Watching programming

    someone please help me to solve this coding... Given 3 inputs - First input is previous reading, second input is current reading and last input is per unit charge , …
  • Member Avatar for David W
    David W

    Replied To a Post in programming

    If you'd like a 'nudge' about how to get started ... then please just ask. Can you code to print a prompt and then take in a string? If the …
  • Member Avatar for David W
    David W

    Began Watching complete the program

    Declare a class (i.e., a type) called CArea and an object (i.e., a variable) of this class called obj. This class contains four members: two data members of type int …
  • Member Avatar for David W
    David W

    Replied To a Post in complete the program

    You really do need to show us what you have tried so that we may see where you are having difficulty. There are exceeding many 'C++ class' example programs all …
  • Member Avatar for David W
    David W

    Began Watching travel salesman

    Given a collection of towns in Borneo, Your task is to design a program using C++ programming language to find a way to visit all the towns and return to …
  • Member Avatar for David W
    David W

    Replied To a Post in travel salesman

    You might like to see this ... Directed Graphs (digraph) and Weighted Directed Graphs (wdigraph) http://developers-heaven.net/forum/index.php/topic,2614.0.html It may help you to get started?
  • Member Avatar for David W
    David W

    Replied To a Post in A problem with acos()

    Please edit above to be: #include <cmath> // re. acos, sqrt //
  • Member Avatar for David W
    David W

    Began Watching A problem with acos()

    I am trying to calculate the angle between two vectors. Here is my relevant code: cout << "\n\nPoint1 "; Point1.dump(); cout << "Point2 "; Point2.dump(); cout << "\nanswer: " << …
  • Member Avatar for David W
    David W

    Replied To a Post in A problem with acos()

    Check you code with this ... // dotProduct.cpp // // 2015-07-23 // // find dot product and angle between ... two (2D) vectors (Points) // #include <iostream> #include <string> #include …
  • Member Avatar for David W
    David W

    Replied To a Post in class and objects

    Actually ... the following is a lttle more accurate (and also less code) ... It (also) makes (some) allowance, re. the count of bricks, for the 'walls MORTAR' at the …
  • Member Avatar for David W
    David W

    Replied To a Post in class and objects

    In C++ ... a 'struct' is an object. The difference is that a C++ 'class' defaults to 'private' ... but a C++ 'struct' defaults to 'public' ... const double MORTAR …

The End.