Re: BGT Handles

Thanks so much! I've only very recently started on C++, so have only gotten as far as if statements and now starting onn loops. Haven't yet gotten to what would be comparable to this. Just to make sure I understand, here's the same example with my notes as to what I think I understand is happening. Please correct me if I'm wrong.

// Creates a function that takes a handle to a string as a parameter.
void print_string(string@ data)
{
  // Prints the alert with the string for which the handle that was passed to it points to.
  alert("handle printer", data);
}
void main()
{
  string data = "" quite a small string, but even i am already bulkier than my handle.";
  // Not too sure here, but assuming it creates a handle that points to the previous data handle?
  string@ data_handle = @data;
  // Calls the print_string function and passes it a handle to the string data.
  print_string(@data);
  // Again, not sure, but assuming it calls the function again, passing it the handle that points to the handle of string data?
  print_string(@data_handle);
  // Again not sure, but guessing it creates a handle to string data?
  print_string(data);
}

Thanks again for all the help!

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Quacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Quacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Quacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector

Reply via email to