Programming Forums
User Name Password Register
 

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

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Mar 22nd, 2008, 2:35 AM   #1
joeserhal
Newbie
 
Join Date: Feb 2008
Posts: 18
Rep Power: 0 joeserhal is on a distinguished road
How to name queues using a "for" loop??

Hi there,
I'm facing some trouble with creating and naming queues in C language.
I need to create five queues using a "for" loop, and with each iteration of the "for" loop, a created queue will be given a name depending on the index of the iteration. It should look like something like this:

for(i=0;i<5;i++)
{
q(i) = CreateQueue(size 2);
}

At the first iteration, I should get a queue called q0 or something, then q1....

I need this because, at a later stage in my program, i need to access,through a "for" loop, a particular queue depending on the index of the iteration.

Does anybody know how i can do this??....
Thanks
joeserhal is offline   Reply With Quote
 

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Correct name for a variable length loop? funkey_monkey Other Programming Languages 6 Jun 2nd, 2007 1:50 AM
server-infinite loop programmingnoob C 19 Oct 1st, 2006 11:52 PM
Value of index incorrect after loop aznluvsmc C 13 Nov 6th, 2005 10:47 PM
WinSock accept() hangs program in Do loop... layer C++ 5 Apr 29th, 2005 12:28 PM
Timing loop problems badbasser98 C++ 11 Mar 10th, 2005 9:30 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:05 AM.

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