Jishnu 160 Posting Pro

You may define the maximum number of attempts made, say N. Then if the user guesses correctly in M guesses, then assign (N-M) to score. Here, better the guessing power, higher will be the value of (N-M).

I am just confused as to how to write the code to print to a txt file to save the scores.

I don't think you will need to print the txt file. You just need to save 5 high scores and the respective usernames in a txt file. Then, whenever a user scores higher than the lowest high score, update the high score list by making appropriate changes in the txt file.

Hope this helps.

Jishnu 160 Posting Pro

After that, you could go for bingo, reversi, go, poker etc.

Jishnu 160 Posting Pro

I THINK SO!!!

I think you are right.

Although the use of goto is discouraged, one can use it over here just as an answer to this problem.

Jishnu 160 Posting Pro

boyz is banned. I thought this thread would be closed.

Jishnu 160 Posting Pro

We will try to help you once you have selected a topic and have a problem. For selecting the topic, introspect. Have an idea about the level of difficulty of you are willing to handle. Then try google for finalizing the topic.

Jishnu 160 Posting Pro

I should have written

right. but he does not need to use cout in order to manipulate arrays. though, what you said is very much right.

then. Okay?

Jishnu 160 Posting Pro

right. but he does not need to use cout in order to manipulate pointers. though, what you said is very much right.

iamthwee commented: nope -2
Jishnu 160 Posting Pro

Make sense?

It makes perfect sense. But, as jwenting has said, innovative designs are confusing as they are non-standard. That is, your customers would take some time in being swift at using it and utilising the speed advantage you have given to them. So, people will be reluctant to use it. I hope I'm clear.

Jishnu 160 Posting Pro

compiler does not let me put a const int value into the int pointer 3 dim array

I don't think there should be any problem with that, i.e. if you have diagonised the bub correctly.

Jishnu 160 Posting Pro

As a "newbie" isn't this a little ambitious?

I'd be tempted to say over ambitious.

Jishnu 160 Posting Pro

There are already so many softwares for it, what would be so special with yours ?

Correct. Also, you are very vague in your ideas.

Jishnu 160 Posting Pro

Not

in the right thread

,

but in the right forum ;)

Jishnu 160 Posting Pro

Also, this thread contains nothing specific to C++ & so, it should be posted in the C forum.

Jishnu 160 Posting Pro

If you want to modify the original program minimally,

*ptr + 1 = 20; // set arr[1] to 20

should be rewritten as

*(ptr + 1) = 20; // set arr[1] to 20

This is because * has higher precedence than +. Also interchange lines 13 & 14.

Jishnu 160 Posting Pro

while(ptr >= arr)
{
cout << *ptr << endl;
ptr--;
}

must be modified to

ptr=arr;
while(ptr <= arr+2)
{
cout << *ptr << endl;
ptr++;
}
Jishnu 160 Posting Pro

Jishnu: Instead of hijacking this thread you should have used the Flag Bad Post button.

However, I believe Sturm is referring to people who aren't exactly breaking DaniWeb's rules, but that he simply has an issue with their threads/posts, and wishes not to see them (at all).

Okay, I'm sorry. I've now realised that Sturm & I were talking about different things. Once again, Sorry.

Jishnu 160 Posting Pro

Minimising the distance travelled by the finger would simultaneously increase the number of hits that you have to make with the finger. Frankly speaking, I don't think this project has any practical application, unless it is a compulsory question given for your homework.

Jishnu 160 Posting Pro

And how do I call on the variables?

Inside the return(String.format()), use the get methods that you have defined for each data field to refer to data like NameIn, ArtistIn, NumberIn... etc.

Jishnu 160 Posting Pro

Does it make sense to format a String for all the variable?

I didn't insist you to do that.

Jishnu 160 Posting Pro

it's not used much. It's been available for like 4 years now, I use Java 1.5 professionally on a daily basis, and I've never encountered it outside web articles listing the new features of 1.5.
Even most books dealing specifically with 1.5 (and were written after it hit the street) don't so much as mention it.

One of the less successful things Sun did to Java before 1.6.

Yup, perhaps that is the reason I had never heard about it before ;)

Jishnu 160 Posting Pro

Yup, this really helped a lot :)

Jishnu 160 Posting Pro

Hey,

I am in full agreement with Sturm. There must be a feature so that members can be banned. I think that atleast you should have a look at these threads and take necessary actions.

http://www.daniweb.com/forums/thread97972.html
http://www.daniweb.com/forums/thread97983.html

Regards,
-Jishnu.

Jishnu 160 Posting Pro

Arguments of strcmp() should both be char pointers. In your case, the first argument is a char, which causes this error.

Jishnu 160 Posting Pro

Ah! It is the compiler again. I used TC++ 3.0. I think that it is time for me to switch over to gcc. Thank you :)

Jishnu 160 Posting Pro

By the way, you should have posted this in the C forum. There is nothing specific to C++ in this thread.

Jishnu 160 Posting Pro

I have had another idea to approuch this.

That is similiar to what I suggested to you over here http://www.daniweb.com/forums/thread98034.html

Jishnu 160 Posting Pro

By the way, you should have posted this in the C forum. There is nothing specific to C++ in this thread.

Jishnu 160 Posting Pro

Search for your problem before posting. It is likely that someone might have faced the same problem earlier.

Jishnu 160 Posting Pro
Jishnu 160 Posting Pro
Jishnu 160 Posting Pro

This is the limit, he is repeating the same thing over here.

Some one responsible at DaniWeb should have a look at this.

http://www.daniweb.com/forums/thread97983.html

Jishnu 160 Posting Pro

zandiago is right. You are having so many questions in C, C++ & Java at a time. And half of them are ill-framed, the other half insisting others to do your homework.

Jishnu 160 Posting Pro

Utter non-sense.

Jishnu 160 Posting Pro

I wonder why this thread is not closed...

Jishnu 160 Posting Pro

How dare he?! This does not make sense at all! He is reposting the question I had asked some time back in a separate thread. Does he think the people at DaniWeb are fools ?? He is filling the C and C++ forums also with silly questions. Hopefully he will be banned.

Jishnu 160 Posting Pro

You are approaching the problem in a very roundabout manner. Try something like this.

double no,a[10]; // Try using dynamic memory allocation here.
int i;
// Let the user input value of no here.
no=360/no; // equal spacing between each array element.
for(i=1;i<=no;i++)
{
	a[i]=sin(PI*i*no/180);
}
// Display a[i] here.
Jishnu 160 Posting Pro

>a[10]=360/a[x]

Didn't understand why.

>int a[[B][U]30[/U][/B]]; //array called a which has 100 integers

How 100?

Jishnu 160 Posting Pro

You can do this thing by accessing VDU memory. But, this will be text mode. I do not know how to do the same thing in graphics mode?

char far *vdu;
int main()
{
	int mm_choice;
	#ifdef MA
		vdu=(char far *)0xb0000000L;
	#else
		vdu=(char far *)0xb8000000L;
	#endif
.............
}
Jishnu 160 Posting Pro

>pappping

what is that?

Jishnu 160 Posting Pro

The question itself is wierd. Why do you want to use a linked list for adding two longs when you can do the same without using it?

Jishnu 160 Posting Pro

You can do something like this:

if(printf("Hello"))
{
}
Jishnu 160 Posting Pro
#define _ -F<00||--F-OO--;
int F=00,OO=00;
main()
{
	F_OO();
	printf("%d %d\n",F,OO);
	printf("%1.3f\n",4.*-F/OO/OO);
}
F_OO()
{
            _-_-_-_
       _-_-_-_-_-_-_-_-_
    _-_-_-_-_-_-_-_-_-_-_-_
  _-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  _-_-_-_-_-_-_-_-_-_-_-_-_-_
    _-_-_-_-_-_-_-_-_-_-_-_
        _-_-_-_-_-_-_-_
            _-_-_-_
}
Jishnu 160 Posting Pro

Still, I'm not able to understand this part of the printf statement.

printf("%1.3f\n",[B][U]4.*-F/OO/OO[/U][/B]);

The global variables F & OO are modified by the function F_OO(). I agree that

F is modified each statement, but OO is only modified once per line.

Surprisingly, when I put a printf statement in between to get values of F & OO, both F & OO turn out to be -16 and the final output is 0.250.
How can F & OO be eqaul if

F is modified each statement, but OO is only modified once per line.

is true?

Jishnu 160 Posting Pro

Thank you :). That really helped me a lot.

Jishnu 160 Posting Pro

a on line 3 is local to main(), while the scope of a in line 6 is limited to the while loop. Inside the while loop, the most local variable is given preference. And if you change a inside the while loop, the value of a on line 3 will remain unaffected. Try it out by using printf statements in between.

Jishnu 160 Posting Pro

i think a in 3rd line is not global its local to the main function and if you change the value of a in the 6th line or ne where inside the program it will display the new value...

ABSOLUTELY WRONG !!!

Jishnu 160 Posting Pro

Use code tags :D

Jishnu 160 Posting Pro

Hey you are not a newbie; how could you post it in the C forum?!

Considering that you are talking about C++, the problem you are facing can be eliminated by using friend functions.

Jishnu 160 Posting Pro

You misunderstood me. I've already learned basic-level C programming. When I came across this program, I was very much curious to know how it works. I love the intricacies of the language. Once again,

I would really appreciate if someone knows and could explain how the program works.

Jishnu 160 Posting Pro

Oops! Ancient Dragon & I replied just at about the same time!!