Solved

strings in arrays

Posted on 2000-03-15
3
170 Views
Last Modified: 2011-09-20
I have an string being sent to a program called trx_str then into that string at positions 15-18 I need to copy the last 4 numbers from another array called seq_number.

Could you help please

TIA

Craig
0
Comment
Question by:csindorf
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
Wyn earned 50 total points
ID: 2620090
Hi,here it is:

int len=strlen(seq_number)-4;
for(int i=0;i<4;i++)
trx_str[i+15]=seq_number[i+len];


Free to ask ...

Regards
W.Yinan
0
 

Author Comment

by:csindorf
ID: 2640661
Thanks
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2640881
You are welcome:)
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Picking random number 8 175
How to update multiple binary circular files in C 3 222
Test against App 49 133
How to translate this 2-line while loop into C from Perl? 8 70
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now