In C++, Can you do something like this? if (use != int) {//do something}

I am making a minigame, and I am thinking of this,

#include <iostream>
int main(){
  int gold = 100;
  double buy;
  std::cout << "Hi! Buy stuff.";
  std::cin >> buy;
  if (buy != 1 or 2 or 3.//and on and on) {
  std::cout << "Sorry, use a whole number to buy stuff.
  //other else ifs or case

I know i have wrong syntax. I want to find how to make it only as a whole number.