104 Posted Topics

Member Avatar for raja289

You are kicking off December! :P Check [ICODE]if(m<=0 || m>=12)[/ICODE]. It should be [ICODE]if(m<=0 || m>12)[/ICODE]. Also check your leap years handling.

Member Avatar for devnar
0
120
Member Avatar for marketingworld

I don't know if it's old, but it makes me laugh every time I even [b]remember[/b] it... [URL="http://media.funlol.com/content/img/lemon-suicide.jpg"]Lemon Suicide[/URL]

Member Avatar for mrboolf
1
178
Member Avatar for soniagupta98

The amount of people that'll help you is somehow proportional to the effort you'll show, not to the number of [URL="http://www.daniweb.com/forums/thread160149.html"]threads[/URL] you'll open. I'm less than a novice with this area of programming, but I found [URL="http://www.linuxhowtos.org/C_C++/socket.htm"]this[/URL] to be interesting and helpful - you may as well start there.

Member Avatar for ithelp
0
246
Member Avatar for syphon_hawk

Check your variable typing (i.e. Max_Lines instead of Max_Line in line 66 but I also read countAlpha instead of alphacount elsewhere). Also, you should pass lines as argument to the function displayTable. You have an out-of-boundaries access for your lines array - be careful how you play with [ICODE]size <= …

Member Avatar for syphon_hawk
0
184
Member Avatar for khatib009

[QUOTE=khatib009;747547]can someone please be willing to help me with this code..i am willing to pay thank you[/QUOTE] LOL, what code?!? well, if you're not lazy beyond hope of recovery... :P Some people (me included) could feel offended by posts like yours - being offered money for what? homework? Try to …

Member Avatar for Ancient Dragon
0
110
Member Avatar for chchiu

[QUOTE]I will remember you forever![/QUOTE] Seriously, how much do you think we care? Moreover, I hardly think so. I'm pretty sure that you won't hold gratitude or appreciation soon after you'll hand that assignment. Not that I'd pay a penny for you being eternally grateful to me. Ancient Dragon already …

Member Avatar for mrboolf
0
128
Member Avatar for jimbob90

You have extra parentheses: write this [CODE=C++]if(strcmp(a,b) > 0) && (strcmp(a,c) > 0)[/CODE] like this[CODE=C++]if(strcmp(a,b) > 0 && strcmp(a,c) > 0)[/CODE]

Member Avatar for ArkM
0
3K
Member Avatar for mrboolf

Hi all there. I was given the task to implement a Subset class with a few function. It should be structured so to contain the original set and make it possible to generate all subsets. Right now I'm focusing on the "generate all subsets" part. I've done a little searching …

Member Avatar for mrboolf
0
744
Member Avatar for rtmarch

I think that in line 89 you should put [ICODE][i][/ICODE] after your usagekwh array in the cout statement. Just had a first glance at your code though.

Member Avatar for vmanes
0
118
Member Avatar for daviddoria

a is not a char, is an array of char. you have to print its component one at a time.

Member Avatar for StuXYZ
0
104
Member Avatar for Nickyu0712

You are missing semicolon [ICODE];[/ICODE] after your class' closing bracket and the assignment [ICODE]name = "Player";[/ICODE] should be [ICODE]strcpy(name, "Player");[/ICODE]

Member Avatar for Nickyu0712
0
335
Member Avatar for sisse56

As a start: [CODE=C++]struct student { std::string name; char gender; int CGPA; };[/CODE] and then access the members like this: [CODE=C++]int main(void) { student myStudent; myStudent.name = "Sarah"; myStudent.gender = 'F'; myStudent.CGPA = 1; // or whathever }[/CODE]

Member Avatar for sisse56
0
1K
Member Avatar for sds234

[QUOTE]Open the file "raw_points.txt" as an input filestream. Open the file "normalized_points.txt" as an output filestream. Read in the count of how many points there are from the input file. Write the count out to the output file (with an endl) and then repeat the following that many times[/QUOTE] 1) …

Member Avatar for StuXYZ
0
142
Member Avatar for Photomotoz

You should write your B class like this: [CODE=C++]class B { A *ob; };[/CODE]and then in B constructor add [ICODE]ob = new A(5);[/ICODE] I think you can't call constructors from within a class declaration.

Member Avatar for StuXYZ
0
98
Member Avatar for Se7Olutionyg

Sorry, I read only the last 3 posts - but shouldn't it be [ICODE]d.rope();[/ICODE] as well as [ICODE]d.head();[/ICODE] ? And you don't want [ICODE]draw::draw()[/ICODE], as VernonDozier already said. Just [ICODE]draw d;[/ICODE]

Member Avatar for cikara21
0
395
Member Avatar for sting23
Re: code

I think the question is: "are you able to read [b]this[/b]?!?". I'm sorry, I'm not :( ...

Member Avatar for mrboolf
0
144
Member Avatar for ohnomis

If you are making a complex class you should return a complex object, and it should not be the first operand. I mean given z and w two complex number, the instruction z + w should not modify z! Instead, it should be used in an expression like c = …

Member Avatar for ohnomis
0
863
Member Avatar for davids2004

If you set something to 0 you can double it for a lifetime - it will never become something different than 0. Think on using a loop to add the dailySalary to the total earntMoney for each day of work. Then you can adjust the value of dailySalary to be …

Member Avatar for VernonDozier
0
151
Member Avatar for Tausif214

Apart from useless variables (numDays array and m) I think your main problem is that the events array just contains garbage data: it is not initialised anywhere. If you intended to use another events array initialised somewhere else in your code you should pass it to the function, or it'll …

Member Avatar for Tausif214
0
101
Member Avatar for Foe89

If both array1 and array2 contain 25 elements then you should write your for loops [CODE=C++] for (count = 0; count < 25; count++)[/CODE] as arrays of n elements are indexed from 0 to n-1. Moreover, the second cout will print the sum of all the elements of the second …

Member Avatar for ddanbe
0
124
Member Avatar for nedsnurb

That's not where the problem lies. [CODE=C++]{ if input == 1 return recursiveGCD; if input == 2 return iterativeGCD; } [/CODE] is wrong both from the syntax point of view and logically. You miss some parentheses and you try to call iterativeGCD and recursiveGCD (that are functions) without passing them …

Member Avatar for nedsnurb
0
133
Member Avatar for Cwapface

Your D class does not inherit from class A. You should write [CODE=C++]class D : A { // your code here };[/CODE] to inherit from class A.

Member Avatar for mrboolf
0
105
Member Avatar for mpCode

I haven't tried something like this yet and I'm pretty new to classes on my own, however I think that the typeid operator would be the right man for the job. Look at [URL="http://www.cplusplus.com/doc/tutorial/typecasting.html"]this[/URL] and give it a try :)

Member Avatar for mrboolf
0
154
Member Avatar for freelancelote

strange, [CODE=C++]#include <iostream> using std::cout; using std::endl; int main(void) { char * word = new char [20]; char temporal[ ] = "hola"; strcpy(word, temporal); cout << word << endl; return 0; } [/CODE] works perfectly for me :S

Member Avatar for freelancelote
0
140
Member Avatar for 666kennedy

a one-dimension array is defined by [ICODE] type name[dimension];[/ICODE] or explicitly [ICODE] type name[] = { element1, element2, ... , elementn }[/ICODE] where n = dimension. It has exactly n elements, indexed from 0 to n-1. For example, an array of five int would be defined either by [ICODE]int myarray[5];[/ICODE] …

Member Avatar for mrboolf
0
115
Member Avatar for SQ89

I think you can start here: [CODE=C++]class Employee { string FirstName; string LastName; int MonthlySalary; public: Employee(); // if you like, you can also add 'Employee(string firstname, string lastname, int salary);' void SetFirstName(string firstname); void SetLastName(string lastname); void SetSalary(int salary); string GetFirstName(void); string GetLastName(void); int GetSalary(void); };[/CODE]

Member Avatar for SQ89
0
548
Member Avatar for rtmarch

Use code tags, please... I see arrays accessed out of their boundaries (check your two for loops), a [ICODE]p=o[/ICODE] that I assume you mistyped for [ICODE]p=0[/ICODE], a semicolon which shouldn't be there and [ICODE]void sort(usagekwh[], customer[])[/ICODE] missing [b]int[/b] before each argument - and that's only after a quick look through …

Member Avatar for MosaicFuneral
0
125
Member Avatar for orwell84
Member Avatar for mrboolf
0
96
Member Avatar for mjfall01

[QUOTE=mjfall01;729513]My name's makhtar new member. i was looking at the website and really like it. talking about that i have a huge problem and i need help. Can somebody help me urgently. You are to develop a program for an auto dealership. This program will keep track of the auto …

Member Avatar for William Hemsworth
0
269
Member Avatar for mrboolf

Hi all there. I was given the task to write a simple Complex Number class as an exercise for a class I'm taking. I already met my professor and all went well (:)) but I'm left with a question which I forgot to ask her: how should I handle any …

Member Avatar for mrboolf
0
122
Member Avatar for meddlepal

I'm fairly new to C++ in general and inheritance in particular so please someone correct me if I'm wrong: it seems to me like your methods definitions are conflicting with base class definitions of the same methods. It's just a guess, I'm waiting for someone else (with more knowledge on …

Member Avatar for meddlepal
0
191
Member Avatar for amerninja2

[QUOTE=amerninja2;731641]how can i create a c++ program that can somehow connect to a phone and let you talk to them through a computer mic? also how do i create an email program?[/QUOTE] You have to study a lot... or to pay some pros to do the job for you. [QUOTE=amerninja2;731641] …

Member Avatar for mrboolf
0
111
Member Avatar for dtaylor01

I'd suggest you to take a look at the Euclidean Algorithm - I don't post links because there's often an example of implementation which could offer some copy-paste temptation... ... not that you couldn't find'em if you wanted to, it's such a common topic... I guess it's your responsability to …

Member Avatar for mrboolf
0
79
Member Avatar for king_blat

[ICODE]cin>>m2>>m2>m3[/ICODE] missing one '>' before m3. You shouldn't put ';' at the end of #includes, also. Apart from that, you should be more specific when asking for help... EDIT: Again you precede me, VernonDozier! :) My fault, I'm slow in replying 'cause I get distracted :P, btw yor answer is …

Member Avatar for mrboolf
0
121
Member Avatar for Nick6425fl

[ICODE]return ceil(sqft/115.)*cpg;[/ICODE] here's your total paint cost. Divide by cost per gallon and you will obtain the number of gallons used Oo (read: do not multiply for cpg). It's the same for the number of hours required: [ICODE]sqft/115.*(18.00*8)[/ICODE] gives you the cost of the whole labor. Divide it by the …

Member Avatar for Nick6425fl
0
1K
Member Avatar for lightzoutdeuce

something like [CODE]int number = some_odd_number; for( ;number_is_odd; ) { asks input; store input in number; } returns number; [/CODE] ?

Member Avatar for gwenky
0
145
Member Avatar for aksshe10

This: [QUOTE=aksshe10;728843]please do write the source code[/QUOTE] And This: [QUOTE=aksshe10;728843]hey i need this for my exams[/QUOTE] Don't really fit well togheter, don't you think? Also, you have another recent, perfectly healty topic on that...

Member Avatar for aksshe10
0
133
Member Avatar for imput1234

read this [URL="http://www.daniweb.com/forums/thread90228.html"]http://www.daniweb.com/forums/thread90228.html[/URL]. Hope it helps :) EDIT: Ops sorry Yiuca, you were faster :P

Member Avatar for imput1234
0
96
Member Avatar for shiniboy

After taking nothing more than a glance at your program I assume these answers will solve your problem: 1) "Insert" one of two players' colour in the board would be, for example, putting Board[i][j] = 1 for player 1 or = 2 for player 2. 2) Hold a variable Turn …

Member Avatar for ff4930
0
73
Member Avatar for bf2loser
Member Avatar for MJFiggs

[ICODE]val = true[/ICODE] sets the content of val to [b]true[/b]. [ICODE]val==true[/ICODE] checks the content of value. They are two very different things! In your while loop and in the two if statements you need the second, so just fix it and your loop will work as expected :)

Member Avatar for MJFiggs
0
487
Member Avatar for number87
Member Avatar for newbie5150

[QUOTE=newbie5150;727067]im not sure how the program tells the difference between odd,even, or zero? from the random number generator thats 1-36. hope you guys can help me out on this.[/QUOTE] [CODE=C++] if(Number%2==0) { cout << Number << " is even" << endl; } else { cout << Number << " is …

Member Avatar for mrboolf
0
144
Member Avatar for shiniboy

You have to allocate dynamically the array if you want its dimension to be chosen by the user. You can't do that the way you tried to. Use something like this for allocation: [CODE=C++]int *myarray; int mydimension; cout << "Insert dimension:" << endl; cin >> mydimension; myarray = new int[mydimension];[/CODE] …

Member Avatar for heerokeno
0
214
Member Avatar for PaladinHammer

Ok, there are plenty of errors. This is not going even to compile. I'd suggest you to rewrite it, adding a single function at a time. I think it would be meaningless to point out all the errors at once, so let's just say for now that: 1) you don't …

Member Avatar for mrboolf
0
120
Member Avatar for BRICEK

[CODE=C++]int main(void) { TryYourself(); if(ProblemArise()) { while(NotWorking()) { PostYourCode(); AskForHelp(); TrySuggestion(); } } cout << "Wow, not it works!"; return EXIT_SUCCESS; }[/CODE] Or, if desperate, start here:[CODE=C++] #include <iostream> using std::cout; using std::endl; void InputArray(int *myarray); int GetMax(int *myarray); int GetAverage(int *myarray); int main(void) { int myarray[10]; InputArray(myarray); cout << …

Member Avatar for freudian_slip
0
94
Member Avatar for hwlibra083

I think your problem lies here: [ICODE]AGE_GROUP[age] = row;[/ICODE]. Maybe you wanted to write [ICODE]row = AGE_GROUP[AGE];[/ICODE]. Also, [CODE=C++]for ( i = 0; i < 9; i++) { cout << "Enter a score: "; } for (i = 0; i < 9; i++) { cout << scores[i] << " "; …

Member Avatar for mrboolf
0
115
Member Avatar for mrboolf

Hi all. I am playing around with [URL="http://www.gnu.org/software/libc/manual/html_node/Reading_002fClosing-Directory.html#Reading_002fClosing-Directory"]this[/URL] and [URL="http://www.daniweb.com/code/snippet579.html"]this[/URL] code snippet by Ancient Dragon. I didn't want to copy-paste so I came out with various simple attempts, the last of which looks like this: [CODE=C++]#include <iostream> #include <unistd.h> #include <dirent.h> #include <vector> #include <algorithm> using namespace std; int main(int …

Member Avatar for mrboolf
0
126
Member Avatar for mrboolf

Hi all. I am trying to overload the operator+ for a SLinkedList class I created. I would like to write [ICODE]list1 = list1 + list2;[/ICODE] and obtaining that list2 is merged into list1. I thought it was simple but it didn't worked properly. I tried to simplify the problem as …

Member Avatar for mrboolf
0
265
Member Avatar for mrboolf

Ok, sorry to bother but it seems I don't understand this properly ^^" I have a simple class, SLListNode, as follows [CODE=C++]template <class D> class SLListNode { public: static int Count; D Data; SLListNode *Next; SLListNode(void); ~SLListNode(void); }; template <class D> int SLListNode<D>::Count = 0; template <class D> SLListNode<D>::SLListNode(void) { …

Member Avatar for mrboolf
0
84

The End.