Skip to content

Instantly share code, notes, and snippets.

@tywoplenty
Created March 4, 2015 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tywoplenty/c8b22495ead8057fe266 to your computer and use it in GitHub Desktop.
Save tywoplenty/c8b22495ead8057fe266 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="insertionsort" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/insertionsort" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/insertionsort" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-fexceptions" />
</Compiler>
<Unit filename="main.cpp" />
<Extensions>
<code_completion />
<envvars />
<debugger />
<lib_finder disable_auto="1" />
</Extensions>
</Project>
</CodeBlocks_project_file>
# depslib dependency file v1.0
1420758066 source:c:\users\taiwo\desktop\grading program\insertionsort\main.cpp
<iostream>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Debug" />
<File name="main.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="523" topLine="6" />
</Cursor>
</File>
</CodeBlocks_layout_file>
#include <iostream>
#include <string>
using namespace std;
class Tring {
int *p_age;
string *p_nationality;
string *p_name;
public:
Tring () : p_name (0){};
Tring (string&n): p_name(&n){};
void parallellist ();
~Tring ();
};
void Tring::parallellist (){
for (unsigned int i =0; i<p_name->size(); i++){
int number = i+1;
char * p_char = &p_name;
cout << number << " " << *p_char << endl;
&p_name+=1;
}
}
void enterstring();
int main () {
enterstring();
Tring neww(theword);
neww.parallellist();
return 0;
}
void enterstring() {
string word;
cout << "Enter the name of the plater: " << endl;
cin >> word;
Tring *ptring = new Tring(word);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment