Another question, then. Why does this work?:

Code:
int main() {
    trans deposits;

    char con = '\0';
    char comment[255];
    double amount;


    deposits.add(45.4, "Test1");
    deposits.add(44.3, "Test2");

    for (int i = 0; i < deposits.getnumtrans(); i++) {
        cout << deposits.getnote(i) << endl;
    }

	return 0;
}
Does it have something to do with text being passed, rather than a variable?