hello guys how properly push,pop,display a char array into another char array, when come to int i can do but in char array its to hard to analyze.. pls guy need some help. thnx in advance
auwi987
0
Light Poster
Recommended Answers
Jump to PostIt depends on how you're storing the items of the stack. Personally, I would use an array of structures:
struct item { char a[ITEM_SIZE]; }; struct item stack[STACK_SIZE]; size_t top = 0;
With that setup, pushing and popping are a simple matter of copying the contained array:
…
All 3 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.