Convert char array to upper case : char array string « String « C++
- C++
- String
- char array string
Convert char array to upper case
#include <iostream>
#include <string.h>
using namespace std;
struct Msg
{
char message[256];
void show_message(void) { cout << message; }
};
struct UpperMsg
{
char message[256];
void show_message(void) { cout << strupr(message); }
};
int main(void)
{
Msg book = { "B" };
UpperMsg book_upr = { "c" };
book.show_message();
book_upr.show_message();
}
Related examples in the same category