• Member Avatar for David W
    David W

    Replied To a Post in Trump

    In Matthew 24 we can hear Jesus warning us about the present BIG FAKE NEWS: *For there shall arise false Christs, and **false prophets**, and shall shew great signs and …
  • Member Avatar for David W
    David W

    Gave Reputation to Reverend Jim in Trump

    I had deleted the previous post for being completely out of touch with reality but I decided to undelete it as an example of how some people are utterly blinded …
  • Member Avatar for David W
    David W

    Liked / Shared Trump

    I think I finally understand why Trump is doing so well (he recently pulled even with Hillary Clinton). It's only after years of shows like American Idol and America's Got …
  • Member Avatar for David W
    David W

    Replied To a Post in Trump

    I haven't checked in for a long time ... We are, for sure, living in the time, long foretold, of *Great Deception* ... see Matthew 24. The first thing I …
  • Member Avatar for David W
    David W

    Began Watching Trump

    I think I finally understand why Trump is doing so well (he recently pulled even with Hillary Clinton). It's only after years of shows like American Idol and America's Got …
  • Member Avatar for David W
    David W

    Replied To a Post in Comparing user input to a string

    If you need use a C++ vector of char, (instead of C++ strings), you might like to try something like this: // compareMyStrings.cpp // // 2017-10-09 // #include <iostream> #include …
  • Member Avatar for David W
    David W

    Replied To a Post in Comparing user input to a string

    Declaring a number with unsigned type is the same as declaring it with unsigned int type. And note that the method .size() returns an unsigned int type. So ... when …
  • Member Avatar for David W
    David W

    Replied To a Post in Comparing user input to a string

    Firstly, you may like to note that you mentioned using a vector of characters, but your code uses C++ strings, which is probably what you really meant to say? Also, …
  • Member Avatar for David W
    David W

    Began Watching Comparing user input to a string

    G'day everyone! I'm fairly new to C++, so bear with me if this is painfully obvious. I'm trying to get a user to guess a string, which is just a …
  • Member Avatar for David W
    David W

    Replied To a Post in How to call objects out of class into my main?

    Also ... in C++ you usually do NOT want redundant parameters in a class! For example, in a circle, if you know one of: radius, diameter, circumference, area you can …
  • Member Avatar for David W
    David W

    Began Watching How to call objects out of class into my main?

    So I've been trying to make a circle class that can calculate the Area, Diameter, and Circumference of a circle. I wish to be able to do this so I …
  • Member Avatar for David W
    David W

    Replied To a Post in Roman to Arbic Converter need help please

    Sometimes a table-lookup method is a nice way to handle problems like this. You might like to see the examples here: http://developers-heaven.net/forum/index.php/topic,134.msg709.html#msg709
  • Member Avatar for David W
    David W

    Began Watching Roman to Arbic Converter need help please

    I am coding a roman to arabic console program for class been having issue with it I am not sure how to get the next char after the the first …
  • Member Avatar for David W
    David W

    Replied To a Post in Hello please help me to converting C++ to C

    You may like to try someting like this to get valid input and to prevent program crashing on accidental input of an invalid type. #include <stdio.h> #define ROWS 5 #define …
  • Member Avatar for David W
    David W

    Began Watching Hello please help me to converting C++ to C

    #include <stdio.h> int main(void) int movieChoice; int seatNum; int seatPlan[5][10] = { 0 }; int rows, cols; char space; void seatDisplay(int a[][10]); void seatNew(int n[][10]); void seatDisplay(int a[][10]) { //this …
  • Member Avatar for David W
    David W

    Replied To a Post in string class implementation

    You seem to have two distinct parts to your project: 1) Code and test a class String 2) Use that class (and perhaps some of its methods) to process lines …
  • Member Avatar for David W
    David W

    Began Watching string class implementation

    Hi All, I have to implement string class and write a program to perform string manipulation in Mystring class. input: "he is going to school" output Case 1: (n=1) He …
  • Member Avatar for David W
    David W

    Replied To a Post in Calling function from another class

    Where in your code is the problem ... what lines ? What are the error messages? If you have a static method in class A you can call like this: …
  • Member Avatar for David W
    David W

    Began Watching Calling function from another class

    Hi I am unable to call a function in one class from another class:In this line of the code it is showing error std::nth_element(edge_points.begin(), edge_points.end() - edge_points.size() * c.edge_points_percent, edge_points.end(),Camera::compare_edge_points); …
  • Member Avatar for David W
    David W

    Replied To a Post in Problems solving loops and arrays

    @ Jemone_1 You said: > Yes I can use functions but I choose to have it working fully before I implement them You have it backwards ... well named functions …
  • Member Avatar for David W
    David W

    Replied To a Post in Problems solving loops and arrays

    @ Dean_5, are you a Java programmer? You said: > ... C++ doesn't allow string comparison via "==" ... Please take a look at: http://www.cplusplus.com/reference/string/string/operators/
  • Member Avatar for David W
    David W

    Began Watching Problems solving loops and arrays

    My application must let a nurse enter information for a number of patients about the patients' number of repetitions for various otherwise ordinary activities. The nurse gets a book in …
  • Member Avatar for David W
    David W

    Replied To a Post in c++

    It is now past 17:30 EST ... and you will need to ask for an extension if you still need help with your school project ... In the future ... …
  • Member Avatar for David W
    David W

    Began Watching c++

    HELLO, i have an project(c++) on quiz(menu based) and im in 11(cbse) i would like to have the source code with the following 1.admin menu 1.1add more ques 1.2 remove …
  • Member Avatar for David W
    David W

    Replied To a Post in A function that takes a 4 digit integer and adds 1 to each digit in scheme

    > b. extend ... to handle input integers with an arbitrary number of digits. How do you plan to handle very long integers? Here is some C++ code that may …
  • Member Avatar for David W
    David W

    Replied To a Post in A function that takes a 4 digit integer and adds 1 to each digit in scheme

    In Python, that easily handles for you, values of type int, to be any length, you might simply code like this: # incrementEachDigit.py # # 2016-10-28 # def takeInValid4Dig(): while …
  • Member Avatar for David W
    David W

    Replied To a Post in A function that takes a 4 digit integer and adds 1 to each digit in scheme

    One quick way to handle this, that easily extends to 'integers' of any length, is to input your numbers as strings ... and then to code a function to increment …
  • Member Avatar for David W
    David W

    Began Watching A function that takes a 4 digit integer and adds 1 to each digit in scheme

    **below is the problem i am given, after this i explain where i am at so far and the code i have created, **Write the following functions in Scheme: 1.a …
  • Member Avatar for David W
    David W

    Replied To a Post in Developing a class to ease student coding crash proof and valid IO

    This discussion is useful ... maybe even a little fruitful ... and perhaps is typical of many little jobs getting their start ... starting out with a fairly simple and …
  • Member Avatar for David W
    David W

    Replied To a Post in How do I insert A Number In a Calculator Without An Error Popping out?

    Just to confirm the ease I suggested ... you might like to see this quickly coded Python example: # findVolForSphereGivenRadius.py # # 2016-10-02 # def takeInFloat( prompt ): while True: …
  • Member Avatar for David W
    David W

    Replied To a Post in How do I insert A Number In a Calculator Without An Error Popping out?

    Is there a clue in the Dani user name that has a `C++` in it, as in: `Linzi c++` Maybe it's some kind of generic code ? So ... to …
  • Member Avatar for David W
    David W

    Began Watching How do I insert A Number In a Calculator Without An Error Popping out?

    I'm trying to make an interactive calculator to solve the volume of a sphere. The thing is that I can't seem to make the program let the user input their …
  • Member Avatar for David W
    David W

    Replied To a Post in Adding to an existing binary file

    As suggested above, you seem to be a bit confuzzed? Working with C++ binary files can be a little tricky, especially at the beginning. I'm not sure what you were …
  • Member Avatar for David W
    David W

    Began Watching Adding to an existing binary file

    I'm guessing the error lies in the writeBinary function where I open the file everytime I write into it. I am not sure how to create the file and have …
  • Member Avatar for David W
    David W

    Replied To a Post in Developing a class to ease student coding crash proof and valid IO

    We seem to have a little communication problem here ? I am NOT at all concerned here about getting/handling any input from a file , neither by opening a file …
  • Member Avatar for David W
    David W

    Replied To a Post in Developing a class to ease student coding crash proof and valid IO

    I suggest a more limited goal here ... for example, there is no redirected input from file to be concerned about here, since these takeIn 'methods' all print to console …
  • Member Avatar for David W
    David W

    Replied To a Post in Developing a class to ease student coding crash proof and valid IO

    Here is another Dani student contributed example problem, slightly reworked here to illustrate using the above class Console ... This example also uses the following class Investment: public class Investment …
  • Member Avatar for David W
    David W

    Edited Developing a class to ease student coding crash proof and valid IO

    This thread will be an attempt to develope a SIMPLE (and good enough) class for beginning Java students, to ease their coding for valid and crash proof, user (Console type) …
  • Member Avatar for David W
    David W

    Edited Developing a class to ease student coding crash proof and valid IO

    This thread will be an attempt to develope a SIMPLE (and good enough) class for beginning Java students, to ease their coding for valid and crash proof, user (Console type) …
  • Member Avatar for David W
    David W

    Created Developing a class to ease student coding crash proof and valid IO

    This thread will be an attempt to develope a SIMPLE (and good enough) class for beginning Java students, to ease their coding for valid and crash proof, user (Console type) …
  • Member Avatar for David W
    David W

    Began Watching Developing a class to ease student coding crash proof and valid IO

    This thread will be an attempt to develope a SIMPLE (and good enough) class for beginning Java students, to ease their coding for valid and crash proof, user (Console type) …
  • Member Avatar for David W
    David W

    Replied To a Post in Java output

    Yah ... sorry PulsarScript ... I think that JC suggested that ... (starting a new thread) ... way back :( Thanks for your post that 'got the ball rolling'. So …
  • Member Avatar for David W
    David W

    Replied To a Post in Java output

    Also ... I have been thinking about a simpler class for beginning students to use to handle console io, for begining student type io problems taking in numeric values via …
  • Member Avatar for David W
    David W

    Replied To a Post in Java output

    Great points James for Java students to utilize :) Also ... I meant to ask you to clarify more your suggestion above ... about and alt 'InputStream' constructor ... Perhaps …
  • Member Avatar for David W
    David W

    Gave Reputation to JamesCherrill in Java output

    A couple of quick suggestions: FutureValue line 32 - the `toString()` is redundant because `print` and `println` do that to their arguments anyway TakeInLine: Lines 74 and 95 should be …
  • Member Avatar for David W
    David W

    Replied To a Post in Java output

    Thank you James for your comments and suggestions: > FutureValue line 32 - the toString() is redundant because print and println do that to their arguments anyway Good catch ... …
  • Member Avatar for David W
    David W

    Replied To a Post in Java output

    With respect to a custom TakeIn class to aid valid student user input from the keyboard, i put together the following TakeInLine class awhile ago, that you may like to …
  • Member Avatar for David W
    David W

    Replied To a Post in Java program

    And ... If you prefer to use private data members in your Java classes, you could sub in the below three classes (files) where appropriate ... public class Customer { …
  • Member Avatar for David W
    David W

    Replied To a Post in Java program

    Since you seem a little confuzzed ... the following may help to jump-start your Java coding ... Firstly ... recall in Java we like to use classes ... but here …
  • Member Avatar for David W
    David W

    Replied To a Post in Java program

    You could use some class methods to aid console string input as per here; https://www.daniweb.com/programming/software-development/threads/506093/java-output Also a class for Customer with methods and a class for Item with methods maybe …

The End.