Skip to content

Instantly share code, notes, and snippets.

View rishav007's full-sized avatar

Rishav Bose rishav007

View GitHub Profile
@rishav007
rishav007 / 3D_vector.cpp
Created February 21, 2018 18:02
3D vector class in c++ .
/*
I am creating a class vector3d which will be used for vector operation . I have overloaded all the basic functions for the required for vector operation .
There is no need for extra class , so no inheritance was necessary .
*/
#include<iostream>
#include<math.h>
#include<assert.h>
using namespace std;
typedef float f;
class vector3d
#include<iostream>
#include<string>
using namespace std;
unsigned int FindFunctionDefn(const char* strFunctionName,const char* strSourceCode)
{
string s1=strFunctionName;
string s2=strSourceCode;
//cout<<"s1 is "<<s1<<endl;
//cout<<"s2 is "<<s2<<endl;
int fn=s2.find(s1);