Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 22nd, 2005, 10:16 PM   #1
Jayydedd
Newbie
 
Join Date: Mar 2005
Posts: 1
Rep Power: 0 Jayydedd is on a distinguished road
adding control variables

I am trying to figure out how to insert control variables(counters) in a simple GetAVoter program. I am just stuck..and need some insight...this is my first time here, so please be patient
Jayydedd is offline   Reply With Quote
Old Mar 22nd, 2005, 10:18 PM   #2
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
Just add a counter variable . . .

It would probably help us to answer your question if you were a little more specific, or if you posted some code.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Mjordan2nd is offline   Reply With Quote
Old Mar 23rd, 2005, 3:22 PM   #3
You Like Java?
Newbie
 
You Like Java?'s Avatar
 
Join Date: Mar 2005
Location: aboho.com (sn:eyvind)
Posts: 20
Rep Power: 0 You Like Java? is on a distinguished road
Send a message via AIM to You Like Java? Send a message via MSN to You Like Java? Send a message via Yahoo to You Like Java?
If you want a simple counter for a loop:

int counter = 0;

If you will hjust be using the counter in that loop, use a for loop (the i is the counter that is increased by one every time it goes through the loop, it can only be used in that loop)
for (int i = 0; i < 10; i ++)
{
   //Loop content goes here
}

Hope that helps.
__________________
If you need help with Java, you can go to javaforum.tk and get answers quickly.

Programmer YouLikeJava = new JavaProgrammer("Eyvind");
YouLikeJava.printInfo();
YouLikeJava.setWeb("You Like Java?");
You Like Java? is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:43 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC