Posts
 
Reputation
Joined
Last Seen
Ranked #362
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
86% Quality Score
Upvotes Received
20
Posts with Upvotes
18
Upvoting Members
14
Downvotes Received
3
Posts with Downvotes
2
Downvoting Members
3
7 Commented Posts
~20.9K People Reached
Favorite Forums
Favorite Tags

75 Posted Topics

Member Avatar for plang007

[QUOTE] yea, i ignored your help, because you did not help me with my code at all, and I did not know what I needed to take out. All I read was advice, NOT HELP. SO I did believe you, you just did not help me. [/QUOTE] He is trying …

Member Avatar for toneewa
0
274
Member Avatar for srikanth2321

I'm posting from my phone and the details are a little iffy but ... If you right-click on your project folder Properties Java build-Path The 2nd tab .. There should be options to add internal and external .jar files.

Member Avatar for srikanth2321
0
248
Member Avatar for skiboy209

That is a lot of if-else statements. Think you can rewrite this with a more logical approach? Note: This is not to bash you! If you can think of creating this with another approach, it may help with other types of OOP. Consider using a class for each player as …

Member Avatar for PalashBansal96
2
255
Member Avatar for JohnQ002

> char name; > char family; > int age; Could it be that your name is only 1 character long. If you want a full name, consider the use of a string. Same goes for the family.

Member Avatar for Saith
0
187
Member Avatar for NunsBeachSurfer

for loop is very likely your best option. Can you show us any code that you have written? Even if you think the code is wrong, please link it. At the very least, consider writing up a pseduocode to see if we agree with the logical approach. Writing pseduocode (writing …

Member Avatar for NunsBeachSurfer
0
225
Member Avatar for justinfritz

> I am having trouble with this part of my program assignment. It would appear you have created and tested each of the classes to make sure they work correctly. This is evident by the comment block for the testing of each ADT class that you made. I would assume …

Member Avatar for Saith
0
314
Member Avatar for c++bob1234

If you still need help with this, please actually ask a question about it. I was left with a sense of .. huh? And attempted to find a question in the lines of code. Also, repost the snippet of code that you are having the problem with and what problem …

Member Avatar for Saith
0
300
Member Avatar for FraidaL

You first want to fill your array. Then send that array to both min and max functions. The array may be filled in the main fucntion, then sent to each of the functions to find the maximum and minimum values in the array. You can fill an array like this. …

Member Avatar for Saith
0
255
Member Avatar for abhimanipal

** > myIterator = find(myVector.begin(), myVector.end(), InRange(10,20)); find(); ... shoudn't it be find_if? myIterator = **find_if**(myVector.begin(), myVector.end(), InRange(10,20)); **

Member Avatar for Saith
0
412
Member Avatar for dariaveltman

dariaveltman > please tell what am I doing wrong. First, please let us know what you are confused about. If you don't know exactly where you are confused in the code or how the code is supposed to work try telling us what you already do know and how you …

Member Avatar for Sahil89
0
183
Member Avatar for c++creator

Is there anything specific you do not understand as there is a lot of information from [CODE]the beginning[/CODE] to [CODE]the end.[/CODE] Possibly explain what you do understand and then we can help with the rest. Otherwise what we would need to do is create a response that is nothing but …

Member Avatar for frogboy77
0
567
Member Avatar for cppdeveloper

Remember, arrays are initialized with a strict size --unless they are dynamic. To access the memory for any array, you access it be 0 through one less than the total size. [CODE] int numbers[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; // numbers[0] = 1; // …

Member Avatar for raptr_dflo
0
164
Member Avatar for jt1008

Please enter code in like this so it's easier for us to read. This is wrong: [CODE] int main (); // You need brackets for the block of code containing the main function. -not a semi-colon ; //like this int main(){ return 0; } [/CODE]

Member Avatar for Fbody
0
159
Member Avatar for fsefsef23

[QUOTE=LevyDee;1608696]From the looks of it, next is a pointer to the object type of what ever p, q, r and t point to. "next" is not a very common name for this that people use(i think). I like to use link. quick look at a simple object that is being …

Member Avatar for LevyDee
0
179
Member Avatar for itgrowsind

Okay. First, please format your code correctly using the [CODE] [/CODE] blocks that are given to us. Makes things a little easier to read. I'm figuring your professor does not want want you to create 5 int variables in the main program and then add them to the list as …

Member Avatar for Saith
0
140
Member Avatar for byrosport

The reason why there isn't anything outputting to the outfile.txt is due to the fact that outChar is being manipulated in the for-loop a number of times but only until the end, past the end of the for-loop, is a call made to the outfile. If you check your normal …

Member Avatar for byrosport
0
283
Member Avatar for clickspiker23

Sure, you can add the second part after the calculations. Prior to that, you may want to slightly edit what you currently have. I'm assuming the code below is suppose to be read as this: [CODE] else if ((choice == 'b') || (choice == 'B')) { charges = packB; cout …

Member Avatar for Saith
0
183
Member Avatar for Saith

Please tell me how bad this code segment is. I figured I would share this horrible code. If it's not as horrible as I think it is, please let me know. Thanks! [CODE] /* Purpose: Create a function to check the input from user. Only valid integer should be returned. …

Member Avatar for vijayan121
0
336
Member Avatar for Saith

I somewhat understand the concept of the parentheses overload when you need to use an object as a function. The question that I have is why does the max variable in the listed code below always input 2. [CODE] /* Purpose: This is the header file of randomInteger.h The class …

Member Avatar for Saith
0
337
Member Avatar for henrimontreal

[QUOTE] You missed an important point. The rectangle "knows" its internal state. When you draw the rectangle, you do not need to send it any data. It already knows its own height, width, etc. (which ave already been set in the constructor or set function). So you just tell it …

Member Avatar for raptr_dflo
0
260
Member Avatar for Red Dragon

One suggestion with your changed if/else that you were working on. If the program fails to open the file, might as well close the program with [CODE] exit(1); [/CODE] at which point you do not need to worry about an else. If it doesn't fail, the program keeps on going …

Member Avatar for Red Dragon
0
360
Member Avatar for Gibran

Only thing I could possibly think of, which could easily be wrong, would be to close the solution, copy and paste your entire program into a new project. The program you are trying to run could possibly be running with an older solution/project, I don't know. Let us know when …

Member Avatar for sergent
0
172
Member Avatar for schrope

You need to change your expression statements in your flow of control. if (first = length * 1.85 + 2.50) // will always be true if (response='n') // will always be true You also don't assign total to anything. At no point in your program do you have written [CODE] …

Member Avatar for Saith
0
103
Member Avatar for Derek Elensar

First, I don't think Narue is a dude. Second, I had this same post about 2 days ago, you may want to check out that thread. [URL="http://www.daniweb.com/software-development/cpp/threads/363659"]here[/URL]

Member Avatar for Derek Elensar
0
205
Member Avatar for Skaii

Good to hear you don't want your homework done for you, it's definitely a plus on my end to see. There are a number of things wrong with the code, but overall, not a bad start. You may want to give us a reason why it may be buggy? Tends …

Member Avatar for Skaii
0
119
Member Avatar for missscareall

You may consider setting your program up so that it first 1. Reads in the numbers through and array. 2. Checks the array against itself 3. then outputs any repeats it may have. What you are currently doing is inputting a number into an array, then checking against array values …

Member Avatar for Saith
0
153
Member Avatar for jimmymack

[QUOTE] The Add() function is declared on line 12. It takes a constant Counter reference, which is the number to add to the current object.(which is varOne?)It returns a Counter object, which is the result to be assigned to the left side of the assignment statement, as shown on line …

Member Avatar for jimmymack
0
142
Member Avatar for Saith

First, my program works. I'm posting my code for my own personal benefit with the help of your guidance to know of any better way of handling this code. I was considering the use of [CODE] while(cin >> grabname) [/CODE] to possibly continue grabbing from the input stream until '\n' …

Member Avatar for vijayan121
0
307
Member Avatar for ztdep

[CODE] double& operator [](int i) //[] which can used as the left value { if(i==0) return x; else if(i==1) return y; else if(i==2) return z; else cerr<<"our of rand index of Point"; } [/CODE] The function has a return type of double which you have returned three times in your …

Member Avatar for ztdep
0
590
Member Avatar for Sorcher

You may want to list the compiler problems, if any, for us to view. Seeing as how there is no description, other than the code, to the problem it is difficult for us to figure out whether this is a 1. syntax problem, 2. logical problem. Lastly, what is this …

Member Avatar for WaltP
-1
140
Member Avatar for mwmnj

[QUOTE=mwmnj;1554229]Hi, I am working on an exercise in operator overloading. I've created a matrix class and I am supposed to overload operators so I can do arithmetic on matrices efficiently. [/QUOTE] This is where the fun part comes into play :D Enjoy it and let it roll. [QUOTE] My directions …

Member Avatar for Saith
0
263
Member Avatar for sha11e

[QUOTE=sha11e;1529731] So one should write like std::cin and such? Seems annoying / ugly =( Should I be doing that? (std::), do experienced programmers do that? =( [/QUOTE] Yes, you can write like that. I have read a few C++ books and both have been shown. I suppose it comes down …

Member Avatar for Fbody
0
173
Member Avatar for thedonflo

Just trying to compile what you have written I immediately get 12 error. You need to change the section prior to your main(). All the variables and loops need to be placed in main, or at the least in a function. After deleting the loops and variable declarations etc as …

Member Avatar for thedonflo
0
102
Member Avatar for gladtoplay5

Yeah, you can't do that with the while loop. [CODE]while(choice != A && choice != B && choice != C ... etc)[/CODE] OR you can write it as [CODE]while( choice < 1 || choice > 4) // basically read as, while choice is less than 1 or greater than 4, …

Member Avatar for Fbody
0
341
Member Avatar for HASHMI007

To add overloading operators to a class definition, you need to add them as a FRIEND function. [CODE] friend <type_name> operator <operator>(const <type_name>& var1, const <type_name>& var2) // Example - rational is a class name not shown but defined else where friend rational operator+(const rational& var1, const rational& var2){ <some …

Member Avatar for HASHMI007
1
186
Member Avatar for jmalbornoz

You can create a namespace for all of your classes and then add that global variable in that namespace. You may consider changing your constructors to your classes to add an additional parameter. As the class is created that variable will be used as a parameter that you can share …

Member Avatar for jmalbornoz
0
3K
Member Avatar for fadi_1234

[QUOTE=veda&&;1523479][B]any could help me ?? thanks [/B][/QUOTE] How about... You start your own thread?

Member Avatar for veda&&
0
91
Member Avatar for jmcginny5

Instead of system pause, I'd recommend something easier on the system itself. [CODE] cin.get(); [/CODE] It's basically - "Press and key and <enter> to continue..."

Member Avatar for zaneulhaq
0
100
Member Avatar for ashrafu1

I can see why you wanted to use your MAIN() in the first instance. [CODE] if(choice<0 || choice>4){ cls(); main(); } [/CODE] If the selected choice is not valid, just restart the program. Instead of restarting the program, just ask the user to "try again" with a more valid input. …

Member Avatar for ashrafu1
0
183
Member Avatar for jackmaverick1

Remember cin.ignore has two parameters. [CODE] cin.ignore(1000, '\n'); [/CODE] This is to clear the input stream useful with while mixing cin.get(param1) and cin >> variable1. Example 1 [CODE] /* Purpose: threads/354626 Name: Saith Date: 3/20/11 */ #include<iostream> using namespace std; int main(){ int var1; char var2; cout << "Input some …

Member Avatar for jackmaverick1
0
205
Member Avatar for highflyer8

[QUOTE=mike_2000_17;1509105]The code you posted would indicate that fourvector is a class derived from the class threevector. The constructor of fourvector simply forwards the one_two_three parameter to its base class constructor. Remark: "I have seen this syntax used for the constructor of the fourvector:" Run! Just run away from this code! …

Member Avatar for Saith
0
137
Member Avatar for a.muqeet khan

[QUOTE=a.muqeet khan;1508506]vmanes sir one more thing did i used the constructor for the p2 correctly ?[/QUOTE] If you are asking about the declaration of your objects to your class as such [CODE] phone p1,p2(a,b,c); [/CODE] Then yes, you can give values of a, b, c with this constructor. Problem occurs …

Member Avatar for a.muqeet khan
0
115
Member Avatar for doraditya

I'm sure you can write a function that will do that for you without needing an entire program. Please show some work.

Member Avatar for template<>
-2
57
Member Avatar for highflyer8

Neither do I, really. I don't see how a random number should be existing in this loop, and then an X value to be returned. I can understand if you want to compare X > Y and change the while expression to [CODE] while (x / 53.0 > y); [/CODE] …

Member Avatar for template<>
0
113
Member Avatar for spoon licker

Learning takes practice, practice takes time. You need plenty of both to get far in anything you do. If this will be anything like your previous posts under the similar name, spoonlicker (not the current spoon_licker), the chances of you getting any type of positive feedback will be minimal. I …

Member Avatar for Saith
0
225
Member Avatar for plang007

You may want to actively step by step debug this with your IDE. First comment out all functions so none are being called or compiled. Take the first function and debug it until it works properly, then un-comment the next function and debug it until it works properly. Do so …

Member Avatar for plang007
-1
292
Member Avatar for plang007

NathanOliver has a good point, just a for-loop. Just in case you haven't done for-loops just yet, you can do basically the same thing with a while loop. Ask for the number of students, create an index for the current loop count, then increment the index once the loop ends. …

Member Avatar for NathanOliver
1
814
Member Avatar for VernonDozier

Luckily, us "smart ones" (really the ones that truly want to find the answer by digging for it) will filter through those kind of responses and will find what we are looking for. I've been a Daniweb member now for ~2 months, ~2 months longer than any other forum, and …

Member Avatar for Ezzaral
2
211
Member Avatar for MaDo4

First, as Crutoy as responded, you want to populate the array. Use nested for-loops. A generic one you may find would include something similar to this. [CODE] /* Purpose: thread347853 - filling a multidimensional array Name: Saith Date: 2/17/11 */ #include<iostream> using namespace std; int main() { const int vertical …

Member Avatar for MaDo4
0
143
Member Avatar for pseudorandom21

No. You can declare variables in the main function. [CODE] int main() { int a, b; <rest of program here> return 0; } [/CODE] Switch statement is a "flow of control" like the if-else statement, while loop, for statement, etc.

Member Avatar for Saith
0
78

The End.