Question: what is the difference between `NSURLConnection` and `NSURL`?

i mean if i am downloading a file, does it make and difference which one i use?

Rgds

for:

```
     NSString *myUrl = @"http://www.test.com/"; 
     NSString *returnData = [NSString stringWithContentsOfURL:[NSURL URLWithString: myUrl]]; 

```

or

```
     NSString *myUrl = @"http://www.test.com/"; 
     NSURLRequest *myRequest = [[NSURLRequest alloc] initWithURL: [NSURL URLWithString:myUrl] ]; 
     NSString *returnData = [NSURLConnection sendSynchronousRequest:myRequest returningResponse: nil error: nil ];  

```

whats the difference?

thks

Answer: 
I bet `uint8` is a `typedef` for `unsigned char` in your system headers. Then `std::cout << u` will print symbols rather than integer values, where `u` is of type `uint8`.
Try

```
std::cout << static_cast< int >( u );

```

or

```
std::cout << +u;

```

to have numeric values printed.
It all depends on how you printing the value out. For cout, try `cout << (long unsigned int)var;`, and for `printf`, you can try using the `%lu` format specifier. However, like usta mentioned, `uint8` is likely defined or typedef'd as something else, since that is not an ISO C++ type. There is also the possibility that `uint8` is typedef'd to `unsigned long int` (generic), or `unsigned __int64` (MS platform specific), and the MSVC++ compiler is just doing the wrong implicit conversion. Without knowing what `uint8` is defined as, it is hard to tell.