File: hello-world.cpp

package info (click to toggle)
emacs-lsp-docker 1.0.0%2Bgit20250423.ff41f4a-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 348 kB
  • sloc: lisp: 705; sh: 50; makefile: 24; cpp: 19; javascript: 13; python: 10
file content (17 lines) | stat: -rwxr-xr-x 304 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
#include <string>

class Greeter {
  std::string greeting;

public:
  Greeter(std::string greeting) { this->greeting = greeting; }
  void SayHello() { std::cout << this->greeting << " world!"; }
};

int main() {
  auto greeter = Greeter("Salam");
  greeter.SayHello();

  return 0;
}