Commit 6b3ddc6b authored by SABBITHI NAREN RAHUL's avatar SABBITHI NAREN RAHUL

add makefile

parent 1dacc156
all: main
main: main.o sorting.o
g++ main.o sorting.o -o main
main.o: sorting.h
sorting.o: sorting.cpp sorting.h
g++ -c sorting.cpp sorting.h
File added
#include<iostream> #include<iostream>
#include<vector> #include<vector>
#include "sorting.h" #include "sorting.h"
#include "sorting.cpp"
using namespace std; using namespace std;
int main(){ int main(){
int n; int n;
...@@ -12,7 +11,7 @@ int x;cin>>x; ...@@ -12,7 +11,7 @@ int x;cin>>x;
a.push_back(x); a.push_back(x);
} }
vector<int> b=sort_custom(a); vector<int> b=sort_custom(a);
for(vector<int>::iterator it=a.begin() ; it!=a.end() ; ++it){ for(vector<int>::iterator it=b.begin() ; it!=b.end() ; ++it){
cout<< *it<<" "; cout<< *it<<" ";
} }
cout<<endl; cout<<endl;
......
File added
File added
File added
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment