什么都不做,当我调用gets()时它甚至不让我输入,甚至我的IDE都声称“语句无效”。
#include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;
int main()
{
char userluv[800], fuusd[800], orig[800], key [51], priv [21];
int tempfussd[800], kint, pint, tint[5], c, lame;
//get the basic info
cout << "key? ";
cin >> key;
cout << "Second key? ";
cin >> priv;
cout << "Your lovely text?:\n";
gets(userluv);
for(c=0; c<=key[c]; c++){
kint += key[c];
}
for(c=0; c<=priv[c]; c++){
pint += priv[c];
}
//do stuff to your key
tint[0] = strlen(key) + strlen(priv);
tint[1] = tint[0] * tint[0];
//string to int then do stuff
for(c=0; c<=userluv[c]; c++){
tempfussd[c] = userluv[c];
tempfussd[c] + kint;
tempfussd[c] * pint;
tempfussd[c] * tint[1];
}
cout << "\n" << tempfussd[c] << "\n";
return 0;
}