[ create a new paste ] login | about

Link: http://codepad.org/BfyIyiZa    [ raw code | output | fork ]

Nameless - C++, pasted on Mar 15:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>

bool func_(const char *beg){
	char id = *beg;
	for( ; *beg ; ++beg, ++id)
		if(*beg != id) return false;
	return true;
}

int main(){
	const char *s1 = "abcz";

	std::cout << (func_(s1)? "Ok...\n" : "Error func_...\n") ;
	

	return 0;
}


Output:
1
Error func_...


Create a new paste based on this one


Comments: