Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

strings in arrays

Posted on 2000-03-15
3
Medium Priority
?
179 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 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

916 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