ok i've been working on this program that takes from a string the part that was bracketed. and i've got this output when i compiled it(without any warnings or errors)
here is the code:
Code:
#include <iostream>
#include <cstdio>
using namespace std;
void formula_devider(char input[128]){
char bracket_formula[128];
int rmb_brk[2];
int brk,n;
bool mark = false;
for(int i = 128; i < 0; i--){
if(!mark){
if(input[i] == ')' ){ //scan for brackets
rmb_brk[1] == i;
mark = true;
}
}
if(input[i] == '('){
rmb_brk[0] == i;
}
}
n = rmb_brk[1] - rmb_brk[0];
for(int j = 0; j > n; j++){
bracket_formula[j] = input[rmb_brk[0] + j];
}
puts(bracket_formula);
}
int main(){
puts("TEST! TEST! TEST! TEST!");
char input[128];
formula_devider(input);
}
Bookmarks