-
Replied To a Post in I need help with writing the code for this project
Nice little problem you posted ... there are many ways to code a solution. Some nice and neat way would be best with clear logic flow. Probably using a C++ … -
Began Watching C++ Looping through pointer pointing to 2D array
Hello All, I am having trouble looping through a 2D array in C++ (should be very easy, but I am just starting C++). At the current moment I have this … -
Replied To a Post in C++ Looping through pointer pointing to 2D array
I would re-think what you are trying to do? This example of a 'class Cube' may give you some ideas re. a simpler design. example of a test main file: … -
Began Watching c++ program that counts number of occurrences of a letter
how to do this? write a c++ program that given the name of a text file reads that file and counts the number occurrences of each alphabetic letter in the … -
Replied To a Post in c++ program that counts number of occurrences of a letter
@Hafiz ... welcome to Dani's. Please note: the post you added to was already 4 years old ... so best to start your own new thread. And it's generally a … -
Began Watching Calling a base class member function in a child class member function
Can anyone please tell me what is the problem in my code: void Laptop::show() { Computer::show(); cout<<"weight is="<<weight<<endl; cout<<"height is ="<<height<<endl; cout<<"length is ="<<length<<endl; cout<<"width is ="<<width<<endl; } I am … -
Replied To a Post in Calling a base class member function in a child class member function
Or ... maybe ... something like in this recent example ... is what you are aiming to do ? https://www.daniweb.com/programming/software-development/threads/500762/need-help-starting-this-program#post2189803 You make like to see this modification to the demo … -
Began Watching Need Help Starting This Program!
I really need help creating this program, i am not very good at coding and you all would be a blessing to help me. Thanks in advance! Assignment Create an … -
Replied To a Post in Need Help Starting This Program!
This related demo may help you to get started ... // airCraft.cpp // #include <iostream> using namespace std; class AirCraft { public: AirCraft( int e = 1 , int s … -
Began Watching C++ array
How does an array variable indexing expression differ from an array definition size expression? -
Replied To a Post in C++ array
> How does an array variable indexing expression differ from an array definition size expression? Recall arrays in C/C++ are 0 based ... i.e. if 'n' slots ... first index … -
Began Watching C++ array (check if it's correct)
Define an int array variable named arx with 3 slots, and stuff a 7 in the last slot int arx[2]=7; or is it: int arx[3]; arx[2]=7; Is this correct? -
Replied To a Post in C++ array (check if it's correct)
> Define an int array variable named arx with 3 slots, and stuff a 7 in the last slot > Is this correct? int arx[2]=7; // NO // > or … -
Replied To a Post in Read/display array and find min, max, sum, and avg. Getting errors.
Note: If you have NEVER BEFORE coded a solution to the problem of reading in some numbers from a text file of numbers ... and then displaying the data in … -
Replied To a Post in Read/display array and find min, max, sum, and avg. Getting errors.
Yes :) That was the first step :) If you enter a file name of a pre-existing text file ... a file that you already made and placed there in … -
Replied To a Post in Read/display array and find min, max, sum, and avg. Getting errors.
Do you know how to compile 'as a project' ? If not ... then change the included file near the top of the main program file to read: #include "numbers.cpp" … -
Replied To a Post in Read/display array and find min, max, sum, and avg. Getting errors.
Or with NO dynamic memory (and a private cal_stats() member called by show_stats() ... at the top before printing the stats) : #ifndef NUMBERS_H #define NUMBERS_H class Numbers { private: … -
Replied To a Post in Read/display array and find min, max, sum, and avg. Getting errors.
This could be a first step (compile all 3 files as a project) : file 1) // file name: numbers.h // /* No global variables should be used in this … -
Began Watching Read/display array and find min, max, sum, and avg. Getting errors.
C++: I'm using Microsoft Visual Studio 2012 and I am really confused and am getting errors. Prompt: Make program that reads 20 integers, display that array, and find min, max, … -
Replied To a Post in Read/display array and find min, max, sum, and avg. Getting errors.
Take it in steps ... Firstly just read in the file and display it back ... Get that working before you add any other methods. You may like to look … -
Began Watching addition program
I need some help in that program to read 2 numbers and print sum of them the program will be tested on one or more test cases. The first line … -
Replied To a Post in addition program
Hi @rose_2, Do you know how to code an "Hello World" type program in C++ ? If you do, then you can prompt for input. Then the next thing ... … -
Replied To a Post in Reading Strings from a File
Hey @tgreiner Sorry about the duplicate post ... I did not notice that duplicate until just now ... If you will check my posts you will see that they are … -
Replied To a Post in game of pig. C coding
But ... I think you still have same 'logic errors' ? Take a look: /* gameStudent151020.c */ #include <stdio.h> #include <stdlib.h> #include <time.h> const int MAX_TOT = 100; const int … -
Began Watching 0 not equal to 0.0000 problem
Hi there, I am stuck in a problem in which my function rounds off a decimal point number upto 4 decimal place and return a 0.0000 number. But when i … -
Replied To a Post in 0 not equal to 0.0000 problem
One way to handle your problem of comparing decimal values to see if they are equal could be ... If your largest number to handle is (about) 99999.9999 ... then … -
Began Watching Dealing a deck of cards (w/ 4 players) without duplicates
Hi guys, My name is Leonard E Norwood Jr. I'm a senior at Norfolk State University and a beginning of programming. I'm just working on a small program on my … -
Replied To a Post in Dealing a deck of cards (w/ 4 players) without duplicates
An other way to approach your problem is to 'huffle the deck' before dealing it out ... Take a look: /* 52Cards.c */ /* You can find file "readline.h" at: … -
Replied To a Post in Reading Strings from a File
If you will carefully re-read ... @tinstaafl > It's pretty hard to say where the problem could be > without seeing **the code IN QUESTION.** -
Began Watching Reading Strings from a File
I've created a program that reads lines from the text file. Each line is parsed to find a command and parameters that are executed. So, the essential code goes something … -
Replied To a Post in Reading Strings from a File
> It's pretty hard to say where the problem could be > without seeing ***the code IN QUESTION.*** -
Replied To a Post in NEED Help In My Project of Database
This link may give you some more ideas about a way to proceed ... http://developers-heaven.net/forum/index.php/topic,2585.0.html -
Began Watching NEED Help In My Project of Database
Hi Guys The thing is that i was asked to make a libaray database managment software for my semester project which i did but now my teacher is asking to … -
Replied To a Post in NEED Help In My Project of Database
Why don't you start fresh and code a little name, phone_number and email type data base? You could use a C++ vector container to hold all the data records (objects) … -
Replied To a Post in cash register class
Dani ... I think we have a 'malicious stalker' haunting your normally nice and friendly web space ? -
Replied To a Post in game of pig. C coding
Look at the 'if ... else ...' examples I gave you of different tests and branching to different sections by set / reset of 'flag' values and see if you … -
Replied To a Post in game of pig. C coding
> ... but i missed the part where if a player rolls a 1, > the score should not be added to his total so it'll be the second players … -
Began Watching Personal Information Class
Hi all. I have a program that uses a class called PersonalInformationClass. The assignment says: Design a class that holds the following personal data: name, address, age, and phone number. … -
Replied To a Post in Personal Information Class
@Ashik_2 ... did you NOT read the previous post before yours? THIS *was/is* a *dead thread.* -
Began Watching cash register class
Hello everyone, I have a shool project that requires me to design a cash register class that uses an inventory class and the cash register should perform the following steps: … -
Replied To a Post in cash register class
... have things ever got so slack around Dani's place ... in the last several weeks ? So many ... *dead threads* ... now ... being resuscitated? -
Began Watching C++ Random Numbers
[B]Intro[/B] This tutorial provides a brief introduction to the random number functions that come as part of the C++ standard library, namely rand() and srand(). [b]rand() and RAND_MAX [/b] The … -
Replied To a Post in C++ Random Numbers
Hey @ Zain_4 ... Do you realize that it is *not* proper etiquette to *hijack* a thread? If you wish to ask a new question, please start a new thread … -
Began Watching What skills do you need to become a good web developer?
Hi, I'm Kavin, I guess I've always been a bit geeky. I'm currently working on my first website and learning HTML and CSS. I'm also quite keen on photoshop. I … -
Replied To a Post in What skills do you need to become a good web developer?
You may also like to learn how to program using the Python computer programming language :) -
Replied To a Post in Problem of Assembly Language
This should help ... http://plantation-productions.com/Webster/www.artofasm.com/Windows/HTML/HelloWorlda3.html#998367 http://plantation-productions.com/Webster/www.artofasm.com/Windows/HTML/images/HelloWorld5.gif ALSO see: https://en.wikipedia.org/wiki/Endianness to see why what you say is possible output ... IS UNLIKELY ... unless you do some special handling with the … -
Began Watching Problem of Assembly Language
Construct a large integer (32 – Bit) from two Byte Variables (8 – Bit) and one Word Type variable (16 – Bit). Store your result into EAX and print it. … -
Replied To a Post in Problem of Assembly Language
Oops ... see following ... duplicate accidently posted here. -
Replied To a Post in Deck of cards game
An other very simple and fast way to handle your card closeness problem could be to do a TABLE LOOKUP ... //card_look_up.cpp // // includes etc... // ... const string … -
Replied To a Post in C++
Oops ... missed fixing a typo within the 30 minute allotted edit time... There was an erroneous period (.) between 'void' and 'print() const' Now fixed in modified *class Student* …
The End.