[ create a new paste ] login | about

GManNickG

Name: Nick Gorski
Email:
Site/Blog: http://www.blackninjagames.com
Location: Washington, US
Default language: C++
Favorite languages: C++, D
About: Hi.

Saved pastes by GManNickG:

C++, pasted on Oct 25:
1
2
3
4
5
#include <iostream>
#include <vector>

struct foo
{
...
view (23 lines, 3 lines of output)
C++, pasted on Oct 23:
1
2
3
4
5
// size of array #1 (lacks type safety)
// size of the entire array divided by the size of an element
#define sizeof_array_1(x) (sizeof(x)/sizeof(x[0]))

// size of array #2 (lacks constant expression result)
...
view (87 lines)
C++, pasted on Jul 19:
1
2
3
4
#include <exception>
#include <iostream>
#include <stdexcept>
#include <string>
...
view (89 lines, 12 lines of output)
C++, pasted on Apr 20:
1
2
3
4
5
// in the general case, T is not a pointer
template <typename T>
struct remove_pointer
{
    typedef T type;
...
view (22 lines)
C++, pasted on Apr 19:
1
2
3
4
5
#include <iostream>

// in the general case, T and U are different
template <typename T, typename U>
struct is_same
...
view (29 lines, 1 line of output)
C++, pasted on Apr 19:
1
2
3
4
5
#include <iostream>

int main(void)
{
    std::cout << "adjacent strings will be "
...
view (20 lines, 1 line of output)