Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Б[0]=A[0];
- Б[0]+=A[0+1];
- Б[0]+=A[0+2];
- QByteArray m = ui->lineEdit->text().toLatin1().data();
- unsigned char ch[9];
- for(int i =0; i<12; ++i)
- {
- if(m[i]==' ')
- m[i]=m[i+1];
- ch[i]=m[i];
- ch[i]+=m[i+1];
- ch[i]+=m[i+2];
- }
- QRegExp val(" ");
- QString newStr = str.replace(val, QString(""));
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main(int argc, char const *argv[]) {
- const char * a = "001 010 010 000";
- char * b = calloc(1, sizeof(char));
- int j = 1;
- for (int i = 0; i < strlen(a); i++) {
- if (a[i] != ' ') {
- b = realloc(b, j*sizeof(char));
- b[j-1] = a[i];
- j++;
- }
- }
- b[j-2] = '