I don't understand how this piece of function
cin.getline(response,3);, work. I thought this cin.getline function is to get user input? I tried to key in the name TOM, but it turns out that only TO...
Type: Posts; User: junkeat90
I don't understand how this piece of function
cin.getline(response,3);, work. I thought this cin.getline function is to get user input? I tried to key in the name TOM, but it turns out that only TO...
lol..I have no idea about array...guess I'll just continue reading the book in order to explore C++ deeper. Anyway, thank you all for trying to explain. I appreciate it very much.
Erm...lets see...
First, the char response[256]. I only know that it's trying to declare a variable response. I have no idea about the [256].
Second, the cin.getline(response,256).
Third,...
I have no idea what does this code means even though the book explained it. I think maybe it didn't explain well enough. Can anyone tell me what does this code means?
//This programme shows an...
wow...nice. I've never thought of using const. By the way, your newline should be this "\n" instead of '/n'.
Does this code:
//This programme shows an example of if...else statement
#include <iostream>
#include <string>
int main()
{
using namespace std;
OMG, matsp, you're a really good programmer and explainer (althought there is no such word in dictionary). I've finally understand =) THANKS!
Can someone tell me why is it
cin >> something, where something is a variable, and not
cin << something???
Because, I got confuse with the cout object as cout uses the symbol <<. Thanks in...
Oh I see...thanks matsp =) You're a real good programmer. Wonder how many years have you been learning C++?
Hi guys, it's me the newbie again =) I've a new question. Here's a piece of code I copied from a book:
//This programme shows an example of the AND && expression
#include <iostream>
int...
lol...I don't know what you mean...because cout will never be a global object? I'm new to programming, sorry for my newbiness
Is that true? So is it just applicable to just a function? For example, if I put boolalpha in main function, can it last until another function prototype?
Hi guys. I'm new to programming. I have a question. I've seen a book teaching C++ and here's the code they gave:
// This programme shows an example of bool data type
#include <iostream>
using...