Hello Guys,
I have implemented a linked list. And my output looks something like dis:
*************************************************
The elements in the list :
address is = 163196952 ADOC1100250100000119666
address is = 163196968 ADOC1100250100000119666
address is = 163196984 ADOC1100250100000119666
address is = 0 ADOC1100250100000119666
TOTAL NO OF ELEMENTS IN THE LIST ARE 4
**************************************************
from the contents of the node, I should pick 1000011 and store it in a seperate array or structure. How do i pick part of the data from the node?
deeep
6
Newbie Poster
Recommended Answers
Jump to PostWhat is the data type of address?
Will the required data be always at the same index of address?
Jump to PostCan you use something like strstr?
Jump to Postyou want to extract part of a string from within a string. the fact that this string is in a linked list is irrelevant. ask yourself the same question, but generalized: "How do i pick part of the data from the string? "
example:
strncpy(&origString[10], subString, 5);
will get …
All 9 Replies
thomas_naveen
105
Junior Poster
deeep
6
Newbie Poster
thomas_naveen
105
Junior Poster
deeep
6
Newbie Poster
deeep
6
Newbie Poster
jephthah
1,888
Posting Maven
deeep
6
Newbie Poster
deeep
6
Newbie Poster
jephthah
1,888
Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.