• Member Avatar for David W
    David W

    Began Watching Programming

    How to learn C++?
  • Member Avatar for David W
    David W

    Replied To a Post in Programming

    Ah ha ... @ArpitJ.25 you have arrived at a wonderful spot to hang out to see all the code examples sailing past you ... Now ... if you try out …
  • Member Avatar for David W
    David W

    Began Watching Calculator with function

    how can i make a calculator using function and procedure..
  • Member Avatar for David W
    David W

    Replied To a Post in Calculator with function

    Note: There are many way to design a solution ... Here is just one simple way ... and a shell program that should get you started: // cal_shell.cpp // #include …
  • Member Avatar for David W
    David W

    Began Watching C++

    I need the solution of this program using C++ .. Develop a database software to maintain the records of students of a college.The software should be user-friendly.The user can easiy …
  • Member Avatar for David W
    David W

    Replied To a Post in C++

    You could try something like this ... to get you started: // binFile_structStudent.cpp // // This example allows ONLY UNIQUE student ID's // #include <iostream> #include <fstream> #include <cstring> // …
  • Member Avatar for David W
    David W

    Began Watching C++ programm

    **Guessing game. Write a c++ game that asks the user to guess a number between 1 and a 100. If you guessed correctly, it will say you win. If your …
  • Member Avatar for David W
    David W

    Replied To a Post in C++ programm

    Can you show us the code you have so far? in a loop : step 1 input a number after a prompt was printed step 2 check if number was …
  • Member Avatar for David W
    David W

    Began Watching really i need to your help

    please can you help to get this answer : ![Capture.PNG](/attachments/large/4/6f316954e2e1f132d107b4029205fd2d.PNG "align-center") I have a problem in the result of kilometer formula #include<iostream> #include<fstream> #include<iomanip> #include<string> using namespace std; int …
  • Member Avatar for David W
    David W

    Replied To a Post in really i need to your help

    You have NOT supplied enough info about your problem. Using some functions would help to see each of the problem steps. Also ... using some global constants could help here …
  • Member Avatar for David W
    David W

    Replied To a Post in Monkey Array issues getting started

    Late comment to add: (It is too late now to edit the above code.) // It might be better to just use a double for the total ? // // …
  • Member Avatar for David W
    David W

    Replied To a Post in Monkey Array issues getting started

    Late comment to add: (It is too late now to edit the above code.) // It might be better to just a double for the total ? // // Be …
  • Member Avatar for David W
    David W

    Began Watching Monkey Array issues getting started

    So i am back again, working with arrays this time. I can get it to run in the main but i am not sure how to make this code into …
  • Member Avatar for David W
    David W

    Replied To a Post in Monkey Array issues getting started

    You may fine this little edit/clean_up of your code ... a useful example for your future coding problems ... Note: little typos in your code will cause your code to …
  • Member Avatar for David W
    David W

    Replied To a Post in search word and search for all the occurrences of that word

    Ok ... bad idea to use conio.h and getch ... if you want to use standard C++ and have portable code ... But where is your attempt to use the …
  • Member Avatar for David W
    David W

    Began Watching Need help with iterators in Lists

    Hi, I am trying to construct a binary tree using a list. class Element { private: list<Element*> _children; char* _name; //...other data members and methods } I have a class …
  • Member Avatar for David W
    David W

    Replied To a Post in Need help with iterators in Lists

    Maybe you are thinking of a hash table... a kind that also uses lists ??? http://en.wikipedia.org/wiki/Hash_table#Separate_chaining_with_other_structures >Chained hash tables with linked lists are popular because they require only basic data …
  • Member Avatar for David W
    David W

    Began Watching search word and search for all the occurrences of that word

    I have another question and trying to solve but did not solve this anyone who help me to solve this the Question start here...... Write a program that reads a …
  • Member Avatar for David W
    David W

    Replied To a Post in search word and search for all the occurrences of that word

    This thread should help some ... to get started ... https://www.daniweb.com/software-development/cpp/threads/494420/finding-total-occurrences-of-any-word-in-strings
  • Member Avatar for David W
    David W

    Began Watching water bills

    Please calculate water bill for Mr Adnan using your program,if last month he used 18 liters of water.Tariff for every liters used in RM0.24.Tariff of RM0.12 will charge for every …
  • Member Avatar for David W
    David W

    Replied To a Post in water bills

    Can you show us what code you have tried so far ... so that we can see where you need help? Can you write out the steps you might do …
  • Member Avatar for David W
    David W

    Began Watching Finding total occurrences of any word in strings

    hey guyss..!! I'm having some difficulties working with strings (cstyle, object oriented strings). as this is something new for me so I'm not exactly familiar with functions of strings aswell.. …
  • Member Avatar for David W
    David W

    Replied To a Post in Finding total occurrences of any word in strings

    See if you can make the changes suggested above ... then try it out and re-submit the new version for help ... if you need more help? I would suggest …
  • Member Avatar for David W
    David W

    Began Watching 2-D Array

    I not know about 2d array Please help me to solve this problem......................... Write a program that declares a 2-D array of 7 rows and 2 columns. The rows represent …
  • Member Avatar for David W
    David W

    Replied To a Post in 2-D Array

    You could use something like this: struct WeekData { int weekNum; int values[7][2]; // ctor... WeekData( int weekNum, int new_values[7][2] ) : weekNum( weekNum ) { for( int i = …
  • Member Avatar for David W
    David W

    Replied To a Post in Average 2D arrays

    So ... show us an example of the data you were given to process.
  • Member Avatar for David W
    David W

    Began Watching Average 2D arrays

    Hi Im stuck doing these in 2d arrays also I dont really get whats its asking for. If someone could help me out I would appreciate it a lot. Find …
  • Member Avatar for David W
    David W

    Replied To a Post in Average 2D arrays

    What have you tried? It would help if you would show us an example of the (file) data (structure) that you seem to need to read and process,
  • Member Avatar for David W
    David W

    Replied To a Post in C++ Question

    Can you solve the problem on paper? If you can ... then turn those steps into code ... and show it, as far as you can go.
  • Member Avatar for David W
    David W

    Began Watching mta fare calculator

    A few months ago someone figured out how much money to put on a metrocard so that you end up with a zero balance instead of random amounts on your …
  • Member Avatar for David W
    David W

    Replied To a Post in mta fare calculator

    If one apple costs 65 cents, how much will n apples cost? Do you know how to multiply n*65 for all (positive integer) values of n?
  • Member Avatar for David W
    David W

    Began Watching Graphics.h of Rock,Paper,Scissors

    I need help to display on the screen rock when user picks rock, paper when user picks paper, and scissors when user picks scissors. Thanks
  • Member Avatar for David W
    David W

    Replied To a Post in Graphics.h of Rock,Paper,Scissors

    You could use a 'Table Look Up' method ... > I need help to display on the screen rock when user picks rock, paper when user picks paper, and scissors …
  • Member Avatar for David W
    David W

    Began Watching C++ Sorting Array using Pointers

    The following code creates a Sorting Array using Pointers and functions correctly. The issue I have is I want the array to sort, but put the zeros at the end. …
  • Member Avatar for David W
    David W

    Replied To a Post in C++ Sorting Array using Pointers

    You need to clarify your original problem ... 1. Are you wanting, to instead, sort the array in descending order? Or... 2. having sorted the array in ascending order, do …
  • Member Avatar for David W
    David W

    Began Watching C++ Program Segment output

    What is the output of program segment: vecList: push_back(3); vecList: push_back(5); vecList: push_back(7); vceIt = vceList.begin( ); ++vecIt; vecList.erase(vecIt); vecList.push_back(9); copy(vecList.begin( ), vecList( ).end( ), screen); cout << end1;
  • Member Avatar for David W
    David W

    Replied To a Post in C++ Program Segment output

    What do you think it is ... and why? http://en.cppreference.com/w/cpp/algorithm/copy
  • Member Avatar for David W
    David W

    Began Watching Pointers and Functions

    All of us started from being a rookie, and I'm one of those rookies who are new in this course. Maybe its time for you to share your expertise unto …
  • Member Avatar for David W
    David W

    Replied To a Post in Pointers and Functions

    Since you mentioned pointers were to be used as part of your solution ... I'm wondering if the prof meant ... function pointers? If so ... then this might get …
  • Member Avatar for David W
    David W

    Began Watching Refreshing my C++ coding

    im looking to brush up on my C++ coding as its been a quite a few months since ive done anything with it and ive run into a snag with …
  • Member Avatar for David W
    David W

    Replied To a Post in Refreshing my C++ coding

    I have found Orwell Dev-C++ to work well for C++11 and before ... it is easy for students to use ... can easily compile a single (student type problem) file …
  • Member Avatar for David W
    David W

    Replied To a Post in Recursive Function 3^n

    If you can use an 'helper' calling function then ... HINT: double sumToN( const double nSum, const double x, const double nTerm, const int N ) { // if( N …
  • Member Avatar for David W
    David W

    Began Watching Classes

    I'm having some trouble attempting to implement the constructors for each class. I have this constructor for the class Transaction. Is this correct ? Transaction::Transaction(QString type, QDateTime datetime) : m_Type(type), …
  • Member Avatar for David W
    David W

    Replied To a Post in Classes

    Try somethinh like this: class Transaction { public: Transaction(QString type, QDateTime datetime) : m_Type(type), m_DateTime(datetime) {} QString getType() const { return m_Type; } QString toString() const { return m_Type + …
  • Member Avatar for David W
    David W

    Began Watching Compute to find Fib- 43

    How do I write a program to compute run-time of a recursive and non-recursive functions to find the 43rd Fibonacci number?
  • Member Avatar for David W
    David W

    Replied To a Post in Compute to find Fib- 43

    Can you start the non-recusive function ... show what you can do ... so we can see what you are missing ... hopefully ... not everything :)
  • Member Avatar for David W
    David W

    Began Watching Recursive Function 3^n

    How do I write a recursive function to compute (3^2)+(3^3)+(3^4).......+(3^n) ?
  • Member Avatar for David W
    David W

    Replied To a Post in Recursive Function 3^n

    An other hint? What could the function prototype look like? int sumToN( const int nSum, const int nTerm, const int N ); What would the tail recursive call look like? …
  • Member Avatar for David W
    David W

    Began Watching C++ Question

    Can someone help me with my assignment?
  • Member Avatar for David W
    David W

    Replied To a Post in C++ Question

    Please post the code you have tried already, the part that is causing you a problem ... and a copy paste of the compiler error message, if any. Also, the …

The End.