Kod: Zaznacz cały
// Pig_latin_strings.cpp : main project file.
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
void beginWithVowel (string sentence )
{
cout<< sentence + "-way";
}
int main()
{
string str;
char firstLetter;
cout<<"Program outputs your string in the pig Latin form \n"
<<"enter your string ";
str = cin.peek();
firstLetter = cin.peek();
if ((firstLetter != 'A') || (firstLetter != 'I') || (firstLetter != 'O') || (firstLetter != 'E') || (firstLetter != 'Y') || (firstLetter != 'a') || (firstLetter != 'i') || (firstLetter != 'o') || (firstLetter != 'e') || (firstLetter != 'y'))
cout<<" Section under construction"<<endl;
else
beginWithVowel(str);
cout<<endl;
system("PAUSE");
}
np.
eye \(\displaystyle{ \Rightarrow}\) eye-way
arse \(\displaystyle{ \Rightarrow}\) arse-way itp.
Problem w tym że nawet jak wpiszę słowo zaczynające się na samogłoskę to funkcja beginWithVowel nie chce się uruchomić w którym miejscu jest błąd?