Solved

strings in arrays

Posted on 2000-03-15
3
169 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

708 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

14 Experts available now in Live!

Get 1:1 Help Now