COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
Loading...
Searching...
No Matches
test.cpp
Go to the documentation of this file.
1
#include <iostream>
2
using namespace
std;
3
4
int
main
() {
5
string
b =
"helo"
;
6
const
char
* a = b.c_str();
7
// c_str() returns c-string character array
8
// since array is actually a pointer pointing to the start of array
9
// the data type is const char *
10
cout << a;
// no need dereference
11
12
cout << (1 < -2 && 2 < 3);
13
}
main
int main()
Definition
test.cpp:4
Module8
test.cpp
Generated on Sun Sep 29 2024 16:39:53 for COMP2113 by
1.12.0