- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
3rd year Mechanical Engineering undergraduate student. A Computing freak... Primarily C++ programmer.... knoledgeable in C, C#, Python, php, erlang and system administration... Oh I have a great sense of humor...!
- Interests
- Coding, 3D Studio design, Playing Brainy Games, Playing Keyboards, and Reading,My passion is Computer…
- PC Specs
- Dell Vostro 1500: Core 2 Duo, 2 GB RAM, 250 GB HDD... nVidia GeForce 8400M GS. Windows 8 and Ubuntu…
14 Posted Topics
Re: `if(income>=100,001) tax=income*r6; else if(income<=100,000 && income >=70,001) tax=income*r5; else if(income>=70,000 && income >=50,001) tax=income*r4; else if(income>=50,000 && income >=30,001) tax=income*r3; else if(income>=30,000 && income >=10,001) tax=income*r2; else if(income>=10,000 && income >0) tax=income*r1;` Remove the commas... in your conditional expression... You write `100,000` as `100000` and same goes for the rest | |
Re: Yups, mike_2000_17. maybe search for him here on daniweb. He will help. Anyway... On C++, I guess you have to primarily know the core of AI(Artificial intelligence). a lot of, control statements; precise algorithms; error control checking and feedback. Then to interface it with a real robot, you have to … | |
Re: ravenous is right. [B]sstream is just good for that Job...[/B] Or you can make a custom [I]container class[/I] that handles creation, and loading of any File contents... 1 to 10. There are several ways to implement the class... you could create different files by appending file Numbers(string or char) to … | |
a small video editing Application using the core of GIMP and Audacity.... libraries that will embed GTk+ and wxWidgets... Which one will you go for?... I am fairly proefficient with Qt | |
Re: The complexity depends on the scalability. If you want it to handle 'hundreds', 'thousands', etc, it would need a little more lines of code. But for 'tens', Use an Array as tajendra said. For English Language, There ARE SEVERAL WAYS TO IMPLEMENT THIS. You may use a string array up … | |
Re: It's not necessary to use a string class, You should have made chooseType a char. If it were a char, Use a single quote... [CODE] if(chooseType == 'a' || chooseType == 'A')[/CODE] But its all good... you are trying. | |
Re: This is something I just put together, well documented... I hope you understand this code [CODE]#include <iostream> //#include <cmath> using namespace std; int main(){ //we introduce 3 ints //a, iterates to the value (length) of adjacent which is user determined //c, the length of adjacent //b, makes space for hypothenus … | |
First of all, I'm 17 learning C++ on my own! I've been enjoying Daniweb. and I did like to thank the community for that! Thank you all! Here goes my Problem... I have a small program that calculates time between two instances and it worked fine... so I decided to … | |
Re: for your functions to work, you have to declare them before the main... as the compiler will make a checklist of what it has seen before while compiling the program from top to bottom, so when it sees a function, it checks for it in its checklist if its seen … | |
Re: Or you could use double loops this code is simpler and easy... [CODE] // This program will ask the user for a positive integer no greater than 15 and will display a square on the screen using the character "X" with a length the size of the number entered. #include … | |
Re: line 29 should be after line 21. test for condition immediately after input.. likewise line 35 should be directly below line 23. according to your code, ...things should be [CODE]int totalRooms = numFloors * numRooms; int unoccupiedRooms = totalRooms - occupiedRooms; //if you want to use a loop to calculate... … | |
Re: because 'p' is a pointer i.e holding an address to a type, variable or object. since : [I]p = new int;[/I] therefore [B]p[/B] is holding the memory of an int the preceding '*' is used to de-reference the pointer... that is: "[I]I don't know what *[B]obj.p[/B] is, but assign whatever … | |
Re: How about [CODE]cout >> "Enter how many objects you want to create: "; int nofobjects; cin << nofobjects; //CORRECTION BELOW //switch(numberofobjects) { //case 1: //objectclass object1; //break; //case 2: //objectclass object1; //objectclass object2; //break; //case 3: if(nofobjects == 3) cout << "Whoa, thats too many!"; objectclass object[nofobject]; //you can then … | |
Re: umm.. This is not native C++ use [B]exceptions[/B] instead of [B]goto[/B]; use simple [B]pointer[/B]s.... You code snippet is not too clear... or to simulate on my own end |
The End.