Hi everyone. I was going along just fine, until I got this Identifier not found error. More specifically, it says "Keypress: Identifier not found". Essentially, I'm learning how to make a console app in C++. Here's the source:
Code:
#include "stdafx.h"
using namespace System;
int _tmain(int argc, _TCHAR* argv[])
{
while(true)
{
Keypress();
}
return 0;
}
void Keypress()
{
String^ line = Console::ReadLine();
if (line->Contains("Increase"))
{
Console::BufferHeight += 1;
}
}
If anyone can see what's wrong here, your input is very valued.
I have a feeling I'm about to get burned...
Nevermind, problem solved. Apparently, I had to "prototype" the function first, by defining it before the main function. Is there a rhyme/reason behind this? Does the compiler just have to "know" about it first, before it gets called?