GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #67 from Collins-a/master · ToJen/Source-Code-from-Tutorials@6c13e76

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • C++
    • 71_cppBeginners.cpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎C++/71_cppBeginners.cpp‎

Copy file name to clipboard
+33Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#include <iostream>
2+
#include <string.h> //gives you the string functions
3+
4+
using namespace std;
5+
6+
int main(int argc, const char *argv[]){
7+
8+
// string bucky;
9+
// cin >> bucky; //only reads upto the first whitespace
10+
// cout <<"The string I entered is " << bucky << endl;
11+
12+
// string x;
13+
// getline(cin,x); //gets the whole line form input
14+
// cout << x << endl;
15+
16+
// string s1("hampster "); //creating string with constructor
17+
// string s2;
18+
// string s3;
19+
//
20+
// s2=s1;
21+
// s3.assign(s2);
22+
//
23+
// cout << s1 << s2 << s3 << endl;
24+
25+
string s1 = "omgwtfbbq";
26+
cout << s1.at(3) << endl;
27+
28+
for(int x=0;x<s1.length();x++){
29+
cout << s1.at(x);
30+
}
31+
32+
return 0;
33+
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.