Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write progeam about sort word with C + + : 1 . Write all programs in cross - platform C + + 2 . No

Write progeam about sort word with C++:
1. Write all programs in cross-platform C++
2. No Containers, NO STL allowed {Vector, Lists, Sets, etc...}
3. Simple Old-fashion C++. No modern C++
4. No Adding files
//1. SortStrings.h
#ifndef SORT_STRINGS_H
#define SORT_STRINGS_H
// Leave this two functions signature... used in unit test
//--- DO NOT MODIFY ---
void ReorderAlphabetical(const char * const inString, char * const outString );
void ReorderWordLength(const char * const inString, char * const outString );
// add sorting help functions here(if You want)
#endif
//--- End of File ---
//2. SortStrings.cpp
#include "SortStrings.h"
void ReorderAlphabetical(const char * const inString, char * const outString )
{
//1) reorder the words in the string, words are separated with spaces
//2) sort words on alphabetical order, (a begin, z end)
//3) you don't know how many words
//4) if dynamically create any buffers inside this routine, clean them up
//5) use strtok_s and strcat_s in your answer
//6) YOU need to use qsort()- might be a good function to know
//7) don't use strcpy, strtok, strcat, etc...MUST USE strcpy_s, strtok_s, strcat_s, etc...
// TODO
}
void ReorderWordLength(const char * const inString, char * const outString )
{
//1) reorder the words in the string, words are separated with spaces
//2) sort words on their word length order, (short, longest)
//3) you don't know how many words
//4) if dynamically create any buffers inside this routine, clean them up
//5) use strtok_s and strcat_s in your answer
//6) You need to use qsort()- might be a good function to know
//7) don't use strcpy, strtok, strcat, etc...MUST USE strcpy_s, strtok_s, strcat_s, etc...
// TODO
}
//--- End of File ---
Please check the annotated comments carefully and complete the code.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions