Skip to content

Instantly share code, notes, and snippets.

View rchatsiri's full-sized avatar
🎯
Focusing

Chatsiri Rattana rchatsiri

🎯
Focusing
View GitHub Profile
#include<iostream>
template<typename Iter,typename T>
where
Inputiterator<Iter> &&
EqualityComparable<Inputiterator< Iter >::value_type,T>
find( Iter first, Iter last, const T& value){
...
}
class BaseClassA {
public:
BaseClassA();
virtual int readBuf(const char*); // same too!.
virtual ~BaseClassA();
};
class SplitBaseA : public BaseClassA{
public :
virtual int splitBaseAReadBuff(const char* value ) = 0;
#include <vector>
#include <stdexcept>
#include <iostream>
#include "Stack.h"
template<typename T>
const T Stack<T>::pop(){
if(isEmpty()){
throw std::out_of_range("Stack<T> is empty");
}
element.pop_back();
#include<vector>
template<typename T>
class Stack{
public:
void push(T const&);
const T pop();
bool isEmpty()const;
T top()const;
private:
std::vector<T> element;
#include <iostream>
#include <istream>
#include <ostream>
#include <string>
#include "Stack.cpp"
#include "boost/shared_ptr.hpp"
int main(int argc, char* argv[])
{
boost::shared_ptr<Stack<int> > stack_ptr(new Stack<int>);
stack_ptr->push(1);
template<typename T,int MAXVALUE>
class ArrayList{
private:
T *valueA;
public:
ArrayList(){
valueA = new T[MAXVALUE];
}
};
#include <stdio.h>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <boost/utility.hpp>
template<typename T>
void deleter(T *ptr){
delete ptr;
}
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <boost/utility.hpp>
#include <iterator>
template<typename T,int MAX_VALUE>
class ArrayList{
private:
T *valueA;
**** Internal Builder is used for build ****
g++ -DWIN32 -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 -IC:\cpp-netlib-0.7\cpp-netlib-0.7 -IC:\boost-build\boost -O0 -g3 -Wall -c -fmessage-length=0 -oConneck.o ..\Conneck.cpp
In file included from C:/cpp-netlib-0.7/cpp-netlib-0.7/boost/network/message/traits/body.hpp:11,
from C:/cpp-netlib-0.7/cpp-netlib-0.7/boost/network/message/message_concept.hpp:13,
from ..\Conneck.h:20,
from ..\Conneck.cpp:11:
C:/cpp-netlib-0.7/cpp-netlib-0.7/boost/network/support/is_sync.hpp:27:53: warning: no newline at end of file
In file included from C:/cpp-netlib-0.7/cpp-netlib-0.7/boost/network/message/message_concept.hpp:13,
from ..\Conneck.h:20,
from ..\Conneck.cpp:11: