- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
- Interests
- Muay Thai
71 Posted Topics
Re: Hi here it is: [code=c]//#include <iostream> //c++ #include <stdio.h> //the same in C int main () { long number; // the number to use to calculate its factorial long factor; // the factorial of the number long term; // next term to use in the calculation // prompt and get … | |
Re: [QUOTE]I guess you don't know how big a 6,000 page book is! I have a copy of "SQL, The Complete Reference", by James Groff & Paul N Weinberg, which has 998 pages and is 2 1/2 inches thick. Your book would be about 15 inches thick! I have never seen … | |
Re: I have another proposition for a recursive solution: [code=c++] #include <iostream> #include <string> std::string GetName(); // String to get user's name. void reverseString(std::string str); int main() { std::string name; name=GetName(); std::cout<<"The string is: "<<name<<std::endl; std::cout<<"Now the reverseString function is going to reverse the string: "<<std::endl; reverseString(name); return 0; } std::string … | |
Re: Hallo here an object oriented solution for your problem. I am expecting u to play with it and test different graphs :) Dont be scared from the size. [code=c++] //this is kind of object oriented solution #include <iostream> class CHorBar { public: CHorBar (int numSymbols) { std::cout << "*";//When i … | |
Re: [QUOTE=niranjan.quasar;795496]What is Broken Inheritence in OOP ? What are the reasons for it ? How can we correct such a problem ?[/QUOTE] Hi I would say that with "broken inheritance" is meant that due to some changes, a specific class cannot be any more inherited. This can happen if u … | |
Hi everybody, I am rather new to VBA programming in EXCEL and I could use some of your help. [U]I want to do the following:[/U] In my excel file there are two sheets: SourceSheet and DestSheet. In SourceSheet there are data filling columns A to I and starting from the … | |
Re: Hello tarekkkkk and everybody else of course :D <<---------------- [QUOTE]tarekkkkk: plz help and yes submit a direct link if u can and thx for advance plz hurry up i have assignment next week i have to finish it lol ..... OK i dont care what is ur problem with my … | |
Re: [QUOTE=sneekula;718765]There are quite a number of states in the US where you need a driver's license to vote. One out of four black folks don't have a driver's license. They are simply too poor to own a car. Many states put their oldest voting machines into the inner cities, where … | |
Re: Hi here a solution to your problem: [code=c++] #include <iostream> using namespace std; class myExpression { public: friend ostream& operator<<(ostream&,myExpression&); friend istream& operator>>(ostream&,myExpression&); int firstNumber; int secNumber; int thirdNumber; }; ostream& operator<<(ostream& out ,myExpression& exp) { if(!cin.fail()) cout<<"{"<<exp.firstNumber<<","<<exp.secNumber<<"," <<exp.thirdNumber<<"," <<"}"<<endl; else cout<<"\nInvalid Data"<<endl; return out; } istream& operator>>(istream& i ,myExpression& … | |
Re: Hi its sth simple: [code=c++] int main() { .... return 0; } [/code] | |
Re: [QUOTE=M00nDancer;733445]I found a quite interesting problem on the Internet, and of course, out of curiosity, I tried to solve it. Too bad nothing came to an end :(. The task was to count the alphabet's upper letters appearing in a given text and to print on the screen all the … | |
Re: Hi Ark has 100% right. have a look [code=c++] #include<iostream> using namespace std; class Point { public: Point() : m_x(0) ,m_y (1.0),m_z(1.0) {} Point(float x, float y, float z) : m_x(x) ,m_y (y),m_z(z) {} void setX(float someX) {m_x = someX;}; void setY(float someY) {m_y = someY;}; void setZ(float someZ) {m_z … | |
Re: Hi could u please post the Customer.h too? | |
Re: hi [QUOTE=ddanbe;723416]Use the scanf function with a conversion specifier. [B]scanf("conversion specifier", variable);[/B] %d means integer %f means floating point munber %c means any character input Example : [B]scanf("%d",i);[/B] The variable i will contain only digits.[/QUOTE] Correct solution but for the C language.... Works for C++ too though. I would propose: … | |
Re: Hi here is what I would change: [QUOTE] struct studInfo { char Name[31]; short Idnum; [B]int Tests;[/B] float avg; char grade; };[/QUOTE] P.S. A general advice: [QUOTE]int main() { .... return 0; }[/QUOTE] | |
Hi to all game programmers :icon_cool: I want to implement the following: Short description: [B]A* Star for partitioned space combined with an adaptive partitioning in 3D.[/B] Detailed description: A. Assume that in the 3D space I have an Object (myMovingObject) that I want to it to move from one initial … | |
Re: Hi since..: [QUOTE]I do not want to use an array in this program, because we have not gone over them in C++, only java... [/QUOTE] let imagine your code :) :) : [code=c++] ... int main() { ...... for ( int i = 0 ; i < 5; i++ ) … | |
Re: [QUOTE=vmanes;723009]Find the length of the text. Subtract that from the width of the output line (usually 80 in a console window). Output half that number blanks before outputting the text, or use setw( ).[/QUOTE] of course u should include: [QUOTE]#include <iomanip>[/QUOTE] otherwise wont work | |
Re: Hallo have a look at my post here: [url]http://www.daniweb.com/forums/thread150700.html[/url] I posted a working implementation of Hanoi Towers in c++ there. U can see both the recursion base case and the recursion step there. If u dont understand sth write what and will try to explain u. | |
Re: Hi before going into your code ..whick looks rather big :D could u please explain us in few words how u defined: [LIST] [*]the recursion base case [*]the recursion step(s) [/LIST] for your task. Furthermore, did u prove that your recursion function is correct using induction? Unless these are not … | |
Re: first of all use code tags. otherwise u wont see any help on the way... | |
Re: [QUOTE=dtaylor01;718386]Can someone take a look at my code and see if they notice something wrong. [ICODE]int score; char grade =0; // read in total score cout << endl; cout << "Enter total score (float, must be <= 100): "; cin >> score; if (score >= 85); grade = 'A'; else … | |
![]() | Re: [QUOTE=tefismp;718426]Someone out there please help me i must do a function for a bucket sort but i dont know how and the only things i must use are normal arrays and pointers no strange functions and libraries i need the code in c++ please i know what the program does … |
Re: [QUOTE]Why are you defining your own PI when cmath comes with M_PI which is alot more accurate than yours?[/QUOTE] Maybe she just heard about it first time from u :D | |
Re: Besides the previous errors due to your programming environment as it seems u have some other as well: In the base class u implemented printInfo: [code=c++] virtual void printInfo() { cout<<"The name of the ship is "<<name<<endl; endl; cout<<"The year the ship was built is "<<year<<endl; }; [/code] and then … | |
Re: Hi first of all in order to use strings u must: [QUOTE] #include <string>[/QUOTE] | |
Re: Could u write a paragraph describing what exactly this code is supposed to do.... then I could help u | |
Re: Hi [QUOTE]1) Are you going to tell us what your instructor wanted you to do, or do you expect us to read your mind ????[/QUOTE] from what I read in his mind :D :D :D :D :D :D [QUOTE]His MIND:[/QUOTE] [code=c++]#include <math.h> #include <iostream> using namespace std; void instruction(); int … | |
Re: Hi, [QUOTE] to solve the compilation error u have to forward the declaration of class device. That means simply add a Help with Code Tags (Toggle Plain Text) class device; class device; before you declare BST good luck[/QUOTE] mmmmm....yes it might compile now, however.... based on your description u defined … | |
Re: [QUOTE]Now for some reason, every time I take a computer related course, I always get a foreign teacher who has a strong accent making it very difficult to learn anything.[/QUOTE] Apparently those teachers which have this strong accent HAVE "STRONG " ALGORITHM understanding. :D I would advise u to tell … | |
Re: hi First of all, there are 3 basic relationships between classes / or object of classes: 1. [B]Is-a relationship[/B] - called Inheritance -> The derived class is a base class with extended capabilities. (Like in your first example) 2. [B]Has-a relationship[/B] - called Embedded class / Composition -> A class … | |
| |
Re: Hi like sbdy told u above search for [QUOTE]filestreams[/QUOTE] but when u start searching for tutorials add the following term as well: [QUOTE]serialization [/QUOTE] A hard disk and thus a disk file too has a one-dimensional structure -> linear. Therefore whenever you write to a file, you write one thing … | |
Re: Hi Simplified in 1 sentence: When [U]an argument of a method is specified as a reference to a variable[/U] and this method is called, THIS [B]METHOD IS ABLE TO CHANGE THE VALUE OF THAT VARIABLE [U]IN CONTRAST TO PASSING THE ARGUMENT BY VALUE[/U] WHERE IT DOES NOT CHANGE THE VALUE … | |
Re: [QUOTE]I managed to to solved it. [/QUOTE] Are u sure? sth tells me u r not :D | |
Re: Hi u might find the post of [url]http://www.daniweb.com/forums/thread151845-2.html[/url] helpful :d have a look at the deserialize function. | |
Re: Compilers: Principles, Techniques, and Tools Author Alfred V. Aho | |
Re: [QUOTE]Go through your compile errors and try to fix as many of those as you can, otherwise how are you going to understand what went wrong ?[/QUOTE] he might expects us to do so....... | |
Re: Hello, if for some reason your internet explorer cannot connect to the network, then windows wont be able to update. The window updates using IE in the background. One common reason for that, is that many people use another browser like Mozilla and BLOCK THE INTERNET EXPLORER THROUGH SOME 3rd … | |
Re: [QUOTE]UML is stupid and should be avoided. And definitely shouldn't be studied and studied and studied and studied and studied... [/QUOTE] mmmm nice opinion full of arguments......... [QUOTE] UML kind of lost its way in my opinion. If you are interested in more detailed reasoning you can read it here: … | |
Re: Hi it sounds very interesting what u did. Would it be possible to post here some part of the interview, that u think was the most important???? | |
Re: Hello, first of all I think u r risking a lot by saving your documents into the "my documents" (because it lies on the C partition) folder. And I will explain u why: U should always create at least one extra partition besides the default C, lets say a D … | |
Re: Hallo I post u a solution to your problem divided into three parts: [U]Part A:[/U] Includes your solution exactly the way you posted it. However it is an [B]inefficient recursive solution[/B], because it has an exponential performance. [U]Part B:[/U] Includes an optimized recursive solution using the help of a wrapper … | |
Re: [QUOTE][1] The reason: a using directive at global scope defeats the purpose of namespaces. The only reason you should have a using directive at global scope is when porting pre-standard C++ quickly. In new code, it's a bad practice.[/QUOTE] EXACTLY :D 100% agree thats why I am writing the whole … | |
Re: Hi lets start with code correctness in relationship to standard c++ and improve some parts too :D [code=c++] #include <iostream> using namespace std; bool PrimeTest(int); int main() //prefer int main() instead of void main() or void main(void) { int num; cout<<"Enter number: "; cin>>num; if (PrimeTest(num)) cout<<num<<" is a prime … | |
Re: exactly the correct is: [QUOTE][B]#include <iomanip>[/B][/QUOTE] | |
Re: Hi [code]If (YouAre==WindowsUser) { If (YouHaveMoney==true) { UseVisualStudio } For writing your code I would recommend u to use UltraEdit since it is simple editor which C++ syntax type as plugin. For compiling I think the best would be g++ like sbdy told u, however it might be difficult to … | |
Re: Do what u were told and u will get some help for sure :) | |
Re: Hi, mmmmm Can it be that u kind of make things complicated??? Have a look at the folowing code, that makes the same like yours and tell me your conclusions :D [code=c++] #include <iostream> int main() { int sum=0; //The sum double mean= 0; //The mean int number[10]; //The array.... … | |
Re: Hi the code u posted is C code and not C++. So u would get better help and more replies if u would post it in the right section. |
The End.