Trouble with error: variable or field 'response' declared void

I've only been trying out arduino for a few days, so im pretty inexperienced. I've been trying to test out a few things with the serial monitor. I've done several little projects and had no syntax problems, so I thought I had a grasp on it, but I'm not so sure now. The main error I'm seeing is the one in the title. "variable or field 'response' declared void" I'm not sure if there is a problem with the function being void, or whether its a problem with the parameters, so I really don't know where to start. If anybody could give me an idea with what I'm doing wrong, that would be greatly appreciated. Thanks!

char initResponse;
char cusResponse;

void setup() {
  Serial.begin(9600);
  Serial.println("Hello, my name is Arduino");

  initResponse = 'Did it';
  cusResponse = 'work?';
 
  if Serial.available() > 0)
  
  {
    response(initResponse, cusResponse);
  }
 




}

void loop() {

}

 void response(initResponse, cusResponse)
  {
    Serial.print(initResponse);
    Serial.println(cusResponse);
  }

initResponse = 'Did it'; That's not the cause of your error message, but it caught my eye.

void response(initResponse, cusResponse)That is the source of your error message.
Look again what you're missing.

Now I really feel clueless, because I still don't know what I'm missing.

In reply #1, it's not want you're missing that's your problem.
In #2, I suggest you look at other function prototypes, like in the IDE examples.

rfitz123:
Now I really feel clueless, because I still don't know what I'm missing.

When you write a function definition, you don't put in the names of the variables you intend to pass to it. You put in placeholder names for the arguments. If you want to use those two global variables then get everything out of the parenthesis. Global variables are already visible to any function.

Okay, I'm pretty sure I see the problem now. Thanks to you both.

Sorry for posting an issue about the same code, but it seems that I've solved one error and made another. Both char's produce the same error. This is the code.

char initResponse = "Did it";
char cusResponse = "work?";
  
void setup() {
  Serial.begin(9600);
  Serial.println("Hello, my name is Arduino");

  respond(initResponse,cusResponse);
  
}

void loop() {

}

void respond(int x,int y)
{
  Serial.print(x);
  Serial.println(y);
}[code]
char initResponse = "Did it";

How many strings can you fit in a char variable?
(Hint: it's about the smallest number you can imagine)

Please don't start new threads for existing topics.