COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
Loading...
Searching...
No Matches
Functions
test.cpp File Reference
#include <iostream>
Include dependency graph for test.cpp:
Go to the source code of this file.
Functions
int
main
()
Function Documentation
◆
main()
int main
(
void
)
Definition at line
4
of file
test.cpp
.
4
{
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
}
moretest.a
a
Definition
moretest.py:10
Module8
test.cpp
Generated on Sun Sep 29 2024 16:39:53 for COMP2113 by
1.12.0