Skip to content

Instantly share code, notes, and snippets.

Created November 2, 2011 20:59
Show Gist options
  • Save anonymous/1334896 to your computer and use it in GitHub Desktop.
Save anonymous/1334896 to your computer and use it in GitHub Desktop.
/*
* Stringverarbeitung.cpp
*
* Created on: 02.11.2011
* Author: Administrator
*/
#include "Stringverarbeitung.h"
Stringverarbeitung::Stringverarbeitung() {
printf("String insert:");
fgets(string, 100, scanf());
char result[100];
int pos = 0;
int i = 0;
boolean cond = false;
for(i; i<100; i++){
if(cond == false){
if(string[i] == "/"){
cond = true;
}
result[pos] = string[i];
pos++;
}else{
if(string[i] == "/"){
continue;
}else{
cond = false;
result[pos] = string[i];
pos++;
}
}
}
printf(result);
}
Stringverarbeitung::~Stringverarbeitung() {
// TODO Auto-generated destructor stub
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment