- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Need C++ code for this logic
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2006 07:53 AM
тАО10-13-2006 07:53 AM
Need C++ code for this logic
To a program i wll pass
Record=3 Chance=4 it should display me all the 1ST 2ND 3RD record of chance1 , chance2, Chance3 Chance4.
It is assume that their wll be total 18 rows in each channel and max channel can be 5 . So in all(18.rows*5.channels) are there. And as shown below max Record can be 6 in each chance.
2nd Example
Record =2 and Chance =3
Should display record
1st 2nD of chance1, Chance2 ,Chance3
For Example 1
Since i have to avoid hard coding,what i have to do is , i wll read record
1st 2nd 3rd 4th of chance1 and skip all the remmaing records of chance1 .4th 5ht and 6th.
then again i wll put my pointer to 1st Record of Chance2 and wll repeat up
to record 4rd and skip remmaing record of chance 2
Repeat this upto chance4.
############################3
1ST:CHANCE1:
1ST:CHANCE1:
1ST:CHANCE1:
2ND:CHANCE1:
2ND:CHANCE1:
2ND:CHANCE1:
3RD:CHANCE1:
3RD:CHANCE1:
3RD:CHANCE1:
4TH:CHANCE1:
4TH:CHANCE1:
4TH:CHANCE1:
5TH:CHANCE1:
5TH:CHANCE1:
5TH:CHANCE1:
6TH:CHANCE1:
6TH:CHANCE1:
6TH:CHANCE1:
1ST:CHANCE2:
1ST:CHANCE2:
1ST:CHANCE2:
2ND:CHANCE2:
2ND:CHANCE2:
2ND:CHANCE2:
3RD:CHANCE2:
3RD:CHANCE2:
3RD:CHANCE2:
4TH:CHANCE2:
4TH:CHANCE2:
4TH:CHANCE2:
5TH:CHANCE2:
5TH:CHANCE2:
5TH:CHANCE2:
6TH:CHANCE2:
6TH:CHANCE2:
6TH:CHANCE2:
1ST:CHANCE3:
1ST:CHANCE3:
1ST:CHANCE3:
2ND:CHANCE3:
2ND:CHANCE3:
2ND:CHANCE3:
3RD:CHANCE3:
3RD:CHANCE3:
3RD:CHANCE3:
4TH:CHANCE3:
4TH:CHANCE3:
4TH:CHANCE3:
5TH:CHANCE3:
5TH:CHANCE3:
5TH:CHANCE3:
6TH:CHANCE3:
6TH:CHANCE3:
6ST:CHANCE3:
1ST:CHANCE4:
1ST:CHANCE4:
1ST:CHANCE4:
2ND:CHANCE4:
2ND:CHANCE4:
2ND:CHANCE4:
3RD:CHANCE4:
3RD:CHANCE4:
3RD:CHANCE4:
4TH:CHANCE4:
4TH:CHANCE4:
4TH:CHANCE4:
5TH:CHANCE4:
5TH:CHANCE4:
5TH:CHANCE4:
6TH:CHANCE4:
6TH:CHANCE4:
6TH:CHANCE4:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2006 07:58 AM
тАО10-13-2006 07:58 AM
Re: Need C++ code for this logic
It is assume that their wll be total 18 rows in each CHANCE and max channel(CHANCE) can be 5 . So in all(18.rows*5CHANCE) are there. And as shown below max Record can be 6 in each chance
NOT CHANNEL ,its CHANCE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2006 09:10 AM
тАО10-13-2006 09:10 AM
Re: Need C++ code for this logic
Also is there a known order of records in the file or do you have to search for them?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2006 03:23 PM
тАО10-13-2006 03:23 PM
Re: Need C++ code for this logic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2006 03:35 PM
тАО10-13-2006 03:35 PM
Re: Need C++ code for this logic
Order of records is 1st(3) 2nd(3row) 3rd(3rows) 4th(3rows)... 6th(3rows)
so 6*3 =18rows ==1 CHANCE.
Total CHANCE Max is 5 , 5*18 =90 rows
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2006 05:46 PM
тАО10-13-2006 05:46 PM
Re: Need C++ code for this logic
The program ignores the contents of the records and assumes the format is 5 groups of 6 of 3 lines.
The trivial output is:
$ a.out Record=1 Chance=2
Doing 1, 2
1ST:CHANCE1:
1ST:CHANCE1:
1ST:CHANCE1:
1ST:CHANCE2:
1ST:CHANCE2:
1ST:CHANCE2:
- Tags:
- for loop