• Member Avatar for David W
    David W

    Began Watching C++

    I'm getting these types of errors: identifier "gm" is undefined or expected a ';' How do I fix these errors? #include <iostream> #include <cstdlib> //srand #include <ctime> //time #include <cmath> …
  • Member Avatar for David W
    David W

    Replied To a Post in C++

    You seem *lost* with repect to coding for a class (or a struct?) in C++ You best start simple ... Here is a simple example of using a C++ struct …
  • Member Avatar for David W
    David W

    Began Watching New To Turbo C Forum (Some Help Required)

    Hey friends i am so excited to join this forum !! its been 3 month since i`ve been learning turbo C !! Now i`ve started lerning and making alot of …
  • Member Avatar for David W
    David W

    Replied To a Post in New To Turbo C Forum (Some Help Required)

    Hey there @ Rodrigo_2 ... Did you know that it is *not* good manners, in help forums like this, to "hijack" some other persons "thread" ? If you really hope …
  • Member Avatar for David W
    David W

    Replied To a Post in game of pig. C coding

    See example solutions to common beginner problems ... 1) take in valid int (with a prompt) so program won't crash 2) keep stdin flushed as you go ... 3) loop …
  • Member Avatar for David W
    David W

    Began Watching game of pig. C coding

    Pig is a simple dice game first described by John Scarne in 19451. It is a form of jeopardy dice game, where a players decisions are between protecting current gains, …
  • Member Avatar for David W
    David W

    Replied To a Post in game of pig. C coding

    You need to start coding, implementing the steps you were given ... and then to show us the code you tried. Re. the unclear graphic output part ... you will …
  • Member Avatar for David W
    David W

    Began Watching Functions in switch statement error (Turbo c)

    Hi guys! I have a program that makes you choose what kind of number conversion you would like to do between Binary to Octal and Binary to Hexadecimal . Here's …
  • Member Avatar for David W
    David W

    Replied To a Post in Functions in switch statement error (Turbo c)

    I would firstly take in a validated binary string ... then convert that.
  • Member Avatar for David W
    David W

    Began Watching Deck of cards game

    I am trying to do a deck of cards in linear form so that I would be able to tell if I am guessing the right card. The program should …
  • Member Avatar for David W
    David W

    Replied To a Post in Deck of cards game

    A first approach might be to use a struct to order all the cards in the deck struct Card { int value; char suit; int place; // 0..51 // } …
  • Member Avatar for David W
    David W

    Began Watching Add functionality to accept strings in avl tree

    Hi,how would i need to change this code to accept strings insted integers in avl tree? template<class T> void InsertItem(TreeType<T>& tree) { cout << "Enter number: "; int num; cin …
  • Member Avatar for David W
    David W

    Replied To a Post in Add functionality to accept strings in avl tree

    The code ? maybe ? something like this: template< class T > void tqkeInAndInsertItem( TreeClass< T >& tree ) { cout << "Enter item: "; T tmp; cin >> tmp; …
  • Member Avatar for David W
    David W

    Replied To a Post in Help with arrays and pointers c++

    This (working) example may give you some more ideas about how to get started ... // meanMedianMode.cpp // // a start // #include <iostream> using namespace std; const int MIN_SIZE …
  • Member Avatar for David W
    David W

    Began Watching Help with arrays and pointers c++

    Hello, so I needing some help with creating a program for my class. The lab requires us to use pointers. This is the description of what we have to do... …
  • Member Avatar for David W
    David W

    Replied To a Post in Help with arrays and pointers c++

    I think the project is not well worded ... and also, it seems to me to be poorly thought out, since creating an 'hole' for a new value ... at …
  • Member Avatar for David W
    David W

    Began Watching ATM using Functions in c language I really need help ASAP

    Programming Exercise ATM Machine In this assignment you will create a program that allows a user to do the following: 1) Create a bank account by supplying a user id …
  • Member Avatar for David W
    David W

    Replied To a Post in ATM using Functions in c language I really need help ASAP

    You may get a few coding ideas from the related examples here: http://developers-heaven.net/forum/index.php/topic,2022.msg2680.html#msg2680
  • Member Avatar for David W
    David W

    Began Watching C: Books recommendations

    What books would you recommend for data structures and algorithms in C language? It would be good if recommended books are books of solved problems.
  • Member Avatar for David W
    David W

    Replied To a Post in C: Books recommendations

    Try this: http://www.mindviewinc.com/CDs/ThinkingInC/ And this: Six Fast Steps to Programming in C http://developers-heaven.net/forum/index.php/topic,2022.0.html
  • Member Avatar for David W
    David W

    Began Watching Help :0

    Write a program that reads integers, finds the largest and counts the occurrences. Assume that when the user enters it ends the sequence. Example : 3 5 5 5 0 …
  • Member Avatar for David W
    David W

    Replied To a Post in Help :0

    If you will show us the code thta you have tried, then we may be able to help.
  • Member Avatar for David W
    David W

    Began Watching Please help me to solve C++ program in array

    Please help me to solve the following program in C++ array. After compile message appears [B]"Possible use of "i" before definition.[/B] [code=c++] #include<iostream.h> #include<conio.h> void selsort(int [],int); void main() { …
  • Member Avatar for David W
    David W

    Replied To a Post in Please help me to solve C++ program in array

    Please start a new thread with each new question. If you are wishing for help with an 'home-work' problem ... you firstly NEED to try to code a solution yourself …
  • Member Avatar for David W
    David W

    Replied To a Post in Randam and Randomize Functions

    It's over due to get a modern C++ compiler that uses standard C++ Hints: srand( time(0) ) ; // seed rand int x = rand()%2; // x is now 0 …
  • Member Avatar for David W
    David W

    Began Watching Randam and Randomize Functions

    How does random and randomize functions work? Please help me! What are the different outputs that can be predicted from this program? And How? Explain. #include<iostream.h> #include<stdlib.h> void main() { …
  • Member Avatar for David W
    David W

    Replied To a Post in Randam and Randomize Functions

    What C++ compiler are you using? It would help to show your programs output also.
  • Member Avatar for David W
    David W

    Began Watching Help With Program. C++

    So i am new to c++, I don't know what is wrong with my program, I keep looking for the issue but can't find why it won'r run. So i …
  • Member Avatar for David W
    David W

    Replied To a Post in Help With Program. C++

    This example to a similar problem may help you to rethink / restart your code. // rowsOfStars.cpp // // demo of a way to accept ONLY VALID inoput ...// /* …
  • Member Avatar for David W
    David W

    Began Watching problem with arrays

    i was given an assignment to create a word construction game where the program will randomly picks a combination of vowels and consonants and the user will build as much …
  • Member Avatar for David W
    David W

    Replied To a Post in problem with arrays

    Here is how I might start to tackle a problem like this ... Note the comments in the program to find all the .h files needed to test it out. …
  • Member Avatar for David W
    David W

    Began Watching OOPS question

    Create a teacher class (teacher name, ID, department, subject currently handled)and student class(student name, regno, subjects, teacher, marks(cae1,cae2,assignment), log) such that the teacher class id made a friend of student …
  • Member Avatar for David W
    David W

    Replied To a Post in OOPS question

    Do you know how to (start the) code for a C++ class? Show us as much as you can ... (i.e. fill in your code for) : #include <iostream> // …
  • Member Avatar for David W
    David W

    Began Watching Underscore

    when naming the constant in C++ program, WHY DOES IT IMPORTANT TO NAME FOR EXAMPLE INCHES_PER_FOOT ?
  • Member Avatar for David W
    David W

    Replied To a Post in Underscore

    Further to @Dani comments ... Naming conventions like using ALL_CAPS for global const values helps the reader 'see' that the value is a 'global const value' Using descriptive names also …
  • Member Avatar for David W
    David W

    Began Watching Negatif An Positif C++ (Help)

    Hello , I've been working for an hour now searching for a solution for a problem i have for tomorrow's workshop so I wanted to be ready for it and …
  • Member Avatar for David W
    David W

    Replied To a Post in Negatif An Positif C++ (Help)

    A next step might be to use functions to get valid input in a loop? Also maybe use a struct tp hold the 'counts'? Take a look: // countPosNeg.cpp // …
  • Member Avatar for David W
    David W

    Began Watching c++ looping constructs

    problem#1 Create a program that will count from 1 to n, wherein n is a user-input number. problem#2 Create a menu and combine previously-created programs into one im a newbie …
  • Member Avatar for David W
    David W

    Replied To a Post in c++ looping constructs

    Try here (some beginning steps): http://developers-heaven.net/forum/index.php/topic,2019.0.html http://developers-heaven.net/forum/index.php/topic,2022.0.html
  • Member Avatar for David W
    David W

    Began Watching How to count numbers in C ?

    How to count number in C language ? For example , I have have input 5 until 7 then it will print 3 or input 2 until 4 then it …
  • Member Avatar for David W
    David W

    Replied To a Post in How to count numbers in C ?

    If you just want the 'inclusive count of numbers' enter beginning number in beg enter ending number in end inclusive count of numbers is: end-beg+1
  • Member Avatar for David W
    David W

    Began Watching split string at different types of characters into separate strings

    Is there a way to split a string at different types of characters into separate strings? char str[] ="(I) 44like22 .cookies. ,This, /is\ ?tricky?"; Something like this? ( I ) …
  • Member Avatar for David W
    David W

    Replied To a Post in split string at different types of characters into separate strings

    You could try code like the below example, that uses these .h files: Note: you can find needed (include) files as per below ... CListOfString.h http://developers-heaven.net/forum/index.php/topic,2582.msg2882.html#msg2882 readLine.h http://developers-heaven.net/forum/index.php/topic,2580.msg2864.html#msg2864 Clist.h http://developers-heaven.net/forum/index.php/topic,2582.msg2877.html#msg2877 …
  • Member Avatar for David W
    David W

    Replied To a Post in Runtime abort when using different input file

    Late edit to above: better to substitute above function with this function ... template< typename T > bool isValid( const string& str ) { T tmp; istringstream iss( str ); …
  • Member Avatar for David W
    David W

    Replied To a Post in Runtime abort when using different input file

    Both of your test files ... https://www.daniweb.com/attachments/2/d01478039506623f9c6fedd582703af8.txt https://www.daniweb.com/attachments/2/da9dcdde1e01ed1698cce4689c5ff447.txt ... seem to be valid when (only roughly) tested like this: // fileReadValidate.cpp // // 2015-09-01 // #include <iostream> #include <fstream> #include …
  • Member Avatar for David W
    David W

    Replied To a Post in Runtime abort when using different input file

    Here is a link to a C++ split function that you might like to use in your data validation program. Reading the size of the list formed from each split …
  • Member Avatar for David W
    David W

    Replied To a Post in Runtime abort when using different input file

    'Eyeballing' is not sufficient here ... You need to validate each line and every field in each line, with a short data validation program that matches the data field requirements …
  • Member Avatar for David W
    David W

    Replied To a Post in Runtime abort when using different input file

    If you are writing to a data .txt file ... and then trying to read that file ... before closing and reopening it ... that also will be a problem. …
  • Member Avatar for David W
    David W

    Replied To a Post in Runtime abort when using different input file

    What does your program do? Could you resend two files: 1st good file that process ok 2nd bad file that crashes
  • Member Avatar for David W
    David W

    Replied To a Post in Runtime abort when using different input file

    So add a 'newline' char to the end of the bad '2nd' file to make it match the ending in the 'good 1st' file and try it then.

The End.