Page 2 of 5

Unread postPosted: Fri Oct 21, 2005 10:32 pm
by Justin
Tyler wrote:Last year I took care of my HTML studies and this year I am taking Visual Basic .NET, C++, and Java for my programming languages. I was wondering if it is at all possible to have a click event procedure when you click on a menu item that loads a HTML page. Does anyone know the command for this I'm baffled.

I'm using the MSDN version of Vistual Studio 2003 if that helps.


Is this in an asp.net page? Or a regular windows form application?

Unread postPosted: Sat Oct 22, 2005 3:32 am
by Tyler
I'm using your basic form application.

Unread postPosted: Sun Oct 23, 2005 11:42 pm
by Justin
Tyler wrote:I'm using your basic form application.


If I'm understanding this right on the menu click event you can shell out to the OS and have a windows explorer page open to a preset URL.

Unread postPosted: Thu Apr 27, 2006 11:31 am
by The Zibbuto
Sorry if I poster a quite similar thread before... :oops:
Well, I got to make a program for an exam at the university and I have a little problem... My program should allow you to play the roulette. Everything is fine excpet for a little thing: when you come to put your "budget" (in order to play) and if you insert a letter from the keyboard, my program goes mad... this is the script that (I think) creates the problem:
for(i=0;i<ngiocatori;i++)
{
cout << "Player " << i+1 << ": please, tell us your budget";
cin >> budget;

/* while (budget[i]<=0||budget[i]>30000||cin.fail()||cin.bad())
NOTA: PROTEGGERE DA INPUT NON INTERI. */

while (budget[i]<=0||budget[i]>30000)
{ cout << "You can only insert a budget between 1 and 30000\n";
cout << "Please insert your budget again: ";
cin >> budget[i]; }

}
/* End budget. */

These are the lines, I think. I use the g++ program (Linux) to run the program....
I've proved everything, the [i]cast operation, ordering the program to not accept char but nothing!
If someone have a suggest, please, answer me here or with Messenger, ICQ, or private mail... I'm desperate!!!! :cry: :x

Unread postPosted: Thu Apr 27, 2006 7:06 pm
by Wix The Great
Since budget is an array of characters I assume, you need:

cout << "Player " << i+1 << ": please, tell us your budget";
cin >> budget[i];

*EDIT: Sorry, not an array of character. Probably an array of doubles or floats since it is a budget.

Unread postPosted: Thu Apr 27, 2006 9:39 pm
by Justin
Bill wrote:Since budget is an array of characters I assume, you need:

cout << "Player " << i+1 << ": please, tell us your budget";
cin >> budget[i];


I believe Bill is right on this one. You need to tell the program where in the array to insert the value.

Unread postPosted: Tue May 16, 2006 5:48 am
by evizaer
The Zibbuto wrote:Sorry if I poster a quite similar thread before... :oops:
Well, I got to make a program for an exam at the university and I have a little problem... My program should allow you to play the roulette. Everything is fine excpet for a little thing: when you come to put your "budget" (in order to play) and if you insert a letter from the keyboard, my program goes mad... this is the script that (I think) creates the problem:
for(i=0;i<ngiocatori;i++)
{
cout << "Player " << i+1 << ": please, tell us your budget";
cin >> budget;

/* while (budget[i]<=0||budget[i]>30000||cin.fail()||cin.bad())
NOTA: PROTEGGERE DA INPUT NON INTERI. */

while (budget[i]<=0||budget[i]>30000)
{ cout << "You can only insert a budget between 1 and 30000\n";
cout << "Please insert your budget again: ";
cin >> budget[i]; }

}
/* End budget. */

These are the lines, I think. I use the g++ program (Linux) to run the program....
I've proved everything, the [i]cast operation, ordering the program to not accept char but nothing!
If someone have a suggest, please, answer me here or with Messenger, ICQ, or private mail... I'm desperate!!!! :cry: :x


You need to have your program check the input first to make sure it is a valid integer. The way your code is now, if you don't input an double or an int, it'll spazz out on you. I haven't written C++ code in a few months, so i don't exactly recall how to test to see if something's an integer. There are plenty of C++ standard library resources on the 'net that probably can assist you.

Unread postPosted: Sun Jun 18, 2006 12:39 pm
by The Zibbuto
Me again, question about DevC++, my compiler for Windows... well, when I press "return" in order to give an order from the prompt... the window disappears! :shock: Does anyobdy know why and how can I make it work?

Unread postPosted: Mon Jun 19, 2006 2:06 pm
by Justin
The Zibbuto wrote:Me again, question about DevC++, my compiler for Windows... well, when I press "return" in order to give an order from the prompt... the window disappears! :shock: Does anyobdy know why and how can I make it work?


I think we need a little bit more info on what you're trying to do there.

Unread postPosted: Wed Jun 21, 2006 8:18 am
by The Zibbuto
I've made the simplest program ever made, a simple addition... it takes teh number from the keyboard with the command cin , but when I press return to insert the number, the window from DevC++ disappear... and I don't know why.
(I can't stand having Linux...)