A loop? Pretty simple:
#include <iostream>
using namespace std;
bool ContainsChar(char c, const char *str)
{
while (*str)
{
if (*str++ == c) return true;
}
return false;
}
int main()
{
cout<<ContainsChar('@', "Hello World");
cout<<ContainsChar('@', "Hello@World");
return 0;
}