I can access http://blackboard.glam.ac.uk/ but not with www.
Pho said:Code:<?php $variable = "It's "; $variable .= " much easier to add text to PHP variables"; ?>
string variable="It's";
variable += " not so hard in C++ either";
FerretBoy said:Code:string variable="It's"; variable += " not so hard in C++ either";
badgermonkey - your original code was almost 100% C, so yes your lecturer is not teaching you good C++, or even good C, just a mix of both. Explains your surprise with string, namespaces etc..
for some structured learning check out:
Accelerated C++: Practical Programming by Example
by Andrew Koenig and Barbara Moo.
FerretBoy said:Code:string variable="It's"; variable += " not so hard in C++ either";
phykell said:Hardly what an experienced programmer would do, but why don't you just make your array global (i.e. declared outside the scope of all your functions). I base this suggestion on the fact that you've declared your structure globally and I also get the impression that your lecturer may have intended for you to do this as well - I imagine he's not even trying to get you using pointers and so on yet?