Solved C++ auto capitializing of variable?

Hewlett-packard / Pavilion touchsmart amd a...
February 18, 2014 at 14:48:52
Specs: Windows 7, 8GB
Here is my code, I want whatever the user inputs to be automatically capitilized then processed, but I can't figure out where or how to implement this, I've tried multiple ways and I can't figure it out, please help

#include <iostream>
#include <string>
#include <ctype.h>
#include <string.h>
#include <fstream>
using namespace std;
//general conversation
string pb[5] = {"HELLO","HI","HEY","WHAT IS YOUR NAME","WHO CREATED YOU"};
string rb[5] = {"Hi there","Hey","I am fine","My name is Ian","General language knowledge module created by Daniel Mombourquette"};

void init()
//to be later filled with things.

void respond(const string inp)
int n = sizeof(pb) / sizeof(string);
for(int i = 0; i < n; i++)
cout << rb[i] << "\n";

int main()
std::string name;
int run = 1;
string inp;
std::getline (std::cin,inp);
ofstream myfile;"log.txt", ios_base::out | ios_base::app);
myfile << inp << endl;
goto label;

See More: C++ auto capitializing of variable?

Report •

February 23, 2014 at 09:04:28
✔ Best Answer
As there has been limited replies on the topic you might look here



Report •
Related Solutions

Ask Question