• Member Avatar for David W
    David W

    Replied To a Post in C++ saving and reading (fairly simple)

    > The computer will select a secret number with five different (unique) digits. The object of the game is to guess that secret number. Each guess is answered by the …
  • Member Avatar for David W
    David W

    Began Watching creating own tech, app or program

    I wanna start project or app which should help me in career... give me some tips I am studying engg. Final sem computer science
  • Member Avatar for David W
    David W

    Replied To a Post in creating own tech, app or program

    One big thing that is very practical: Collecting and Analyzing Data Note that 'Process Control' depends on the above.
  • Member Avatar for David W
    David W

    Replied To a Post in HANGMAN Dictionary..

    Just remembered this ... http://developers-heaven.net/forum/index.php/topic,2587.msg3019.html#msg3019 some C++ code of 'random generation of 4 letter words' ... and related student correspondence ... that you may also like to see for ideas.
  • Member Avatar for David W
    David W

    Began Watching HANGMAN Dictionary..

    Greeting Guys .. I'm Asked to make the Hangman Game using C++ .. Acutally I'm stuck in how to put a dictionary of words ( each 5 letters ) inside …
  • Member Avatar for David W
    David W

    Replied To a Post in HANGMAN Dictionary..

    Since you are using C++, you can use an array of C++ string to hold your words. This may help get you started ... const int MAX_NUM_WORDS = 1000; // …
  • Member Avatar for David W
    David W

    Replied To a Post in problem in accepting string via gets function in C

    Hey ... we all needed to start, somewhere ... and if some code compiles ... and IF it also gives the 'correct' output ... and if one is just beginning …
  • Member Avatar for David W
    David W

    Replied To a Post in unhandled exception error? cant seem to solve a tiny error!

    Some ideas re. new function calls (slight revisions) #include <iostream> #include <string> #include <cstring> // re. strlen, strchr #include <cctype> // re. toupper.. const char VALID_CHARS[] = "DMU"; const int …
  • Member Avatar for David W
    David W

    Replied To a Post in unhandled exception error? cant seem to solve a tiny error!

    McD's is a local abbreviation for McDonalds As a first step in your conversion to using a C string (array of char's with a terminal '\0' char) ... you could …
  • Member Avatar for David W
    David W

    Replied To a Post in unhandled exception error? cant seem to solve a tiny error!

    Hey ... it's 4:53 here now ... also I was just going to leave McD's wi-fi when some over-drunk kids crashed on to my table ... and I noticed you …
  • Member Avatar for David W
    David W

    Replied To a Post in unhandled exception error? cant seem to solve a tiny error!

    Try this ... #include <iostream> #include <string> #include <cctype> // re. toupper... using namespace std; const string VALID_CHARS = "DMU"; void my_swap( string& s, int i, int j ) { …
  • Member Avatar for David W
    David W

    Replied To a Post in unhandled exception error? cant seem to solve a tiny error!

    So ... are you saying that #uumdudmm#sfgvdfgsdf is valid input ? Or ... only that #uumdudmm# is to accepted ? in which (2nd) case is the output to be ddmmmuuu …
  • Member Avatar for David W
    David W

    Replied To a Post in unhandled exception error? cant seem to solve a tiny error!

    Isn't that what the 2nd example on the above page does? (Did you see it there? I added it later than the first edit.)
  • Member Avatar for David W
    David W

    Replied To a Post in unhandled exception error? cant seem to solve a tiny error!

    Are you saying the input can be EITHER 1) "with # at the end" // only dmu are valid here or 2) "up to #" ... ignore rest // only …
  • Member Avatar for David W
    David W

    Replied To a Post in unhandled exception error? cant seem to solve a tiny error!

    Try this ... (to get started) ... #include <iostream> #include <string> #include <cctype> // re. toupper... using namespace std; const string VALID_CHARS = "DMU"; void my_swap( char& a, char& b …
  • Member Avatar for David W
    David W

    Replied To a Post in unhandled exception error? cant seem to solve a tiny error!

    If you only accept ... U, M, and D Then you should validate your input to only accept that ... or if lower case ... to change lower umd to …
  • Member Avatar for David W
    David W

    Began Watching unhandled exception error? cant seem to solve a tiny error!

    hi so this project requires an input of U, M, or D and as many as you like of them (i think, might be only up to 100 based on …
  • Member Avatar for David W
    David W

    Replied To a Post in unhandled exception error? cant seem to solve a tiny error!

    Since using C++, why not use C++ string and gain the ease of its use ? Try something like this: #include <iostream> #include <string> using namespace std; void my_swap( char& …
  • Member Avatar for David W
    David W

    Replied To a Post in [programming practice] using const when needed vs always use it

    Maybe ... they just have not yet learned about C++ "const correctness" ? The use of const seems to be left ... till later ... for many students :)
  • Member Avatar for David W
    David W

    Began Watching [programming practice] using const when needed vs always use it

    Can you guys please help me understand when to use const? For example, if I have the following functions: viod add (int* array) { int total = array[1] + array[2]; …
  • Member Avatar for David W
    David W

    Replied To a Post in [programming practice] using const when needed vs always use it

    'const' ... in your examples ... tells the compiler that the values in the array are NOT to be changed ... and the compiler will warn you then, if you …
  • Member Avatar for David W
    David W

    Began Watching Structs + calculations.

    I really love working with structs, and I get how they work and everything. And I know my issue right now is the math (I'm horrible at math!) But my …
  • Member Avatar for David W
    David W

    Replied To a Post in Structs + calculations.

    In case you have not yet encountered using the C++ STL vector container, (which is really just an easily re-usable and easily expandable dynamic array), you might like to see …
  • Member Avatar for David W
    David W

    Began Watching how to use character for output?

    how to use character for output?
  • Member Avatar for David W
    David W

    Replied To a Post in how to use character for output?

    @naveen1993 please see my comments after your post at: http://www.daniweb.com/software-development/c/threads/469587/problem-in-accepting-string-via-gets-function-in-c
  • Member Avatar for David W
    David W

    Began Watching problem in accepting string via gets function in C

    #include<stdio.h> #include<conio.h> int main() { char cyp[150],eng[26]; scanf("%s",eng); gets(cyp); getch(); return 0; } eng is accepted but only one letter is accepted for cyp.
  • Member Avatar for David W
    David W

    Replied To a Post in problem in accepting string via gets function in C

    @naveen1993 Please note: 1. old post (now dead? - maybe you missed the date?) 2. NOT portable code ... if one uses <conio.h> , clrscr, getch, etc... 3. maybe you …
  • Member Avatar for David W
    David W

    Began Watching Convert from C++ to C

    Hello, I have this program that runs in C++ that I need to run in C. This is my program in C++: #include <iostream> #include <string> #include <cctype> using namespace …
  • Member Avatar for David W
    David W

    Replied To a Post in Convert from C++ to C

    You may like to try this C 'readLine' emulation of C++ 'getline' ... /* CppToC_via_readLine.h.c */ /* using readLine to emulate C++ getline ... */ #include "readLine.h" /* get copy …
  • Member Avatar for David W
    David W

    Replied To a Post in change settings in C

    This may give you some ideas ... /* structPoint.c */ #include <stdio.h> #include <ctype.h> /* re. tolower */ typedef struct { int x, y; } Point ; void printPoint( const …
  • Member Avatar for David W
    David W

    Replied To a Post in project

    I just remembered this link re. Newton's Method of Finding Roots ... [Newton's Method of Finding Roots](http://developers-heaven.net/forum/index.php/topic,2602.msg2997.html#msg2997)
  • Member Avatar for David W
    David W

    Replied To a Post in HELP !! lower case count

    So ... if you want the count of the numbers at the end ... (as per your example output)... after you have tallied up all elements in your array ... …
  • Member Avatar for David W
    David W

    Began Watching change settings in C

    how to do this in C: if got: myheader.h: #define sz 5 in program if option = 2, sz for marray change to 10. extern unsigned char marray[arrsz]; also, in …
  • Member Avatar for David W
    David W

    Replied To a Post in change settings in C

    Your questions are not really clear ... If you need different sized arrays ... you could use dynamic allocation of memory or just use two defines #define SIZE_10 10 #define …
  • Member Avatar for David W
    David W

    Began Watching Array-based Lists and Array-based Queues

    Hi, i have a home work to do and is about Array-based Lists and Array-based Queues but i have no idea what goes on with my class since they have …
  • Member Avatar for David W
    David W

    Replied To a Post in Array-based Lists and Array-based Queues

    Just looked your problem over ... This may get you started ... //5 courses available //only 8 allowed in each course //(so ... in main ... need 5 queue, each …
  • Member Avatar for David W
    David W

    Began Watching project

    can sb help me?İ have to make a project.... 4.power polinoms i have to find the real roots an complex root. anybody any idea for these. Thanks....!
  • Member Avatar for David W
    David W

    Replied To a Post in project

    What do you already know about a 4th power poly... ? Can you (differentiate and) find the max (extreme points -> if the graph of y = ax^4 + bx^3 …
  • Member Avatar for David W
    David W

    Began Watching HELP !! lower case count

    i need to Design and write a program to count the number of occurrences of each of the characters ‘A’ to ‘Z’, ‘a’ to ‘z’ and ‘0’ to ‘9 entered …
  • Member Avatar for David W
    David W

    Replied To a Post in HELP !! lower case count

    Recalling the above good insights of @Ancient Dragon ... > I would do it by using an array of 255 ints, each element in the array represents one of the …
  • Member Avatar for David W
    David W

    Replied To a Post in Overloading a function

    But ... what if the OP is using his real name ... and is just beginning coding ?
  • Member Avatar for David W
    David W

    Replied To a Post in C++ console game freezes HELP

    You need to turn them on, on your compiler ... to see them. #include <windows.h> //#include <stdio.h> // C usage style #include <cstdio> // C++ usage style //#include <string.h> include …
  • Member Avatar for David W
    David W

    Began Watching C++ console game freezes HELP

    /* Made in code::blocks 12.11 -randomly generated terrain mirrored to be equal for bought players - - */ #include <iostream> #include <windows.h> #include <stdio.h> #include <string.h> #include <ctype.h> #include <fstream> …
  • Member Avatar for David W
    David W

    Replied To a Post in C++ console game freezes HELP

    You have several compile errors ... In line 81: > ISO C++ forbids variable length array 'boardWithPieces' You could use a ... vector < string > vecStr( size ); // …
  • Member Avatar for David W
    David W

    Replied To a Post in how to simulate file space allocation with c++

    The coding problem that you seem to be posing is not a 'beginner type' problem, I would say ... So you should be able to post some code ... other …
  • Member Avatar for David W
    David W

    Began Watching Help with Random Number Generator please

    Hi, this program is a high-low guessing game that generates a random number and the user has 6 guesses to win their bet. When I run my code the "random …
  • Member Avatar for David W
    David W

    Replied To a Post in Help with Random Number Generator please

    Show your complete new code.
  • Member Avatar for David W
    David W

    Began Watching how to simulate file space allocation with c++

    i want to write a c++ code that due the structure of file space allocation,Simulates file system with 2*n array.Each column represents a sector,The first row is for storing files …
  • Member Avatar for David W
    David W

    Replied To a Post in how to simulate file space allocation with c++

    Ok ... post the code you have so far ... and where you think you are having a problem.
  • Member Avatar for David W
    David W

    Began Watching Overloading a function

    My IDE codeblocks 10.05 cant run a program which is overloading functions. Any help please..maybe due to settings

The End.