Search URL now correctly appears: removed a std::cout that got mixed with std::wcout.

Also changed some comments that spanned over 79 characters.
This commit is contained in:
King_DuckZ 2013-08-21 16:02:39 +02:00
parent 402f90b5df
commit 3c334595c8
6 changed files with 99 additions and 55 deletions

View file

@ -30,8 +30,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace {
const char* DefApiKey = "58327";
///-------------------------------------------------------------------------
///-------------------------------------------------------------------------
///------------------------------------------------------------------------
///------------------------------------------------------------------------
const char* GetBaseName (const char* parPath) {
const size_t len = std::strlen(parPath);
const char* found;
@ -44,8 +44,8 @@ namespace {
return found;
}
///-------------------------------------------------------------------------
///-------------------------------------------------------------------------
///------------------------------------------------------------------------
///------------------------------------------------------------------------
bool GetCommandLine (boost::program_options::variables_map& parVarMap, int parArgc, const char* const parArgv[]) {
const char* const programName = parArgv[0];
std::ostringstream oss;
@ -82,8 +82,8 @@ namespace {
}
} //unnamed namespace
///-----------------------------------------------------------------------------
///-----------------------------------------------------------------------------
///----------------------------------------------------------------------------
///----------------------------------------------------------------------------
int main (int parArgc, const char* const parArgv[]) {
//std::setlocale(LC_CTYPE, "UTF-8");
std::setlocale(LC_CTYPE, "");
@ -113,7 +113,7 @@ int main (int parArgc, const char* const parArgv[]) {
WordReference wref(langFrom, langTo, DefApiKey);
wref.Translate(searchWord, std::wcout);
std::cout << wref.GetHttpLink(searchWord) << "\n";
std::wcout << wref.GetHttpLinkW(searchWord) << "\n";
}
std::wcout << L"Written by King_DuckZ; © WordReference.com" << std::endl;
return 0;