i'm trying to design a c program that will help newcomers to the Internet understand certain abbreviations.I have 8 abbreviations such as AFAIK - as far as i know etc. I am storing the abbreviations in one array [][8],and the descriptions in another[][8] and initialising them. BUT, I don't know how to link the two arrays together. I think I have to copy one string to another, but not sure what the loop is. I haven't been taught pointers yet, but i know I need to use strcpy. Can someone please help?
mch682
0
Newbie Poster
Recommended Answers
Jump to PostHere is a small example on how to do it, you can easily mould it to your needs:
#include <iostream> #include <cstring> int main() { char* digit[] = { "1", "2", "3", "4" } ; char* number[] = { "one", "two", "three", "four" } ; for( int …
All 2 Replies
Reply to this topic
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.