expected deconstructor (shift register)

i have some code designed to work with a seven segment display and a shift register. it gives the following error for uno: expected constructor, destructor, or type conversion before '(' token. it looks like this

//8-bit shift register with 7-seg

const int data = 11; // pin to set data
const int clck = 13; // pin that needs to be switched for every data set
const int latch = 12; // sends out data

void setup() {
  // put your setup code here, to run once:
  pinMode(data, OUTPUT);
  pinMode(clck, OUTPUT);
  pinMode(latch, OUTPUT);
}

void display(int number, bool dp) {
  int data_send;
  switch (number) {
    case 1:
      data_send = 96 + dp;
      break;
    case 2:
      data_send = 218 + dp;
      break;
    case 3:
      data_send = 242 + dp;
      break;
    case 4:
      data_send = 102 + dp;
      break;
    case 5:
      data_send = 182 + dp;
      break;
    case 6:
      data_send = 250 + dp;
      break;
    case 7:
      data_send = 224 + dp;
      break;
    case 8:
      data_send = 254 + dp;
      break;
    case 9:
      data_send = 246 + dp;
      break;
    default:
      data_send = 252 + dp;

  }
}
  digitalWrite(latch, LOW);
  shiftOut(data, clck, LSBFIRST, data_send);
  digitalWrite(latch, HIGH);

void loop() {
  // put your main code here, to run repeatedly:
  int num = 0;
  while (true) {
    display(num, true);
    num++;
    if(num > 9){
      num = 0;
    }
    delay(500);
  }
}

i have tried using binary numbers instead of integer, i have tried using different types for dp, and i have tried using type conveters

ndcu:

  digitalWrite(latch, LOW);

shiftOut(data, clck, LSBFIRST, data_send);
 digitalWrite(latch, HIGH);

These lines need to be inside a function, most likely the display() function.

thank you. normally i write in python so i didn't check my brackets

If you use the auto format function in the IDE (Ctrl-T) it will indent your code properly which makes it easy to see those lines suddenly move to the first column.

int data_send = dp;

Save yourself some typing, but change "dp" to an integer type first.; I'm not sure what "96 + false" is supposed to mean.

i have tried using binary numbers instead of integer

Unless you're adept at writing IEEE-754, binary numbers will be integers