Message from C, C++ discussions
December 2019
— OK thanks , I got it
Okay. For the next time. don't break the rules and if you have to take a screenshot... don't do it with your phone...
— I am new in CPP , and in fact I am from Afghanistan and we haven't good facilities
— Ideal way to use phone take the screen shot with the print screen button and then transfer that to the phone.
— Anyone has hand written notes of C basics ?
— Dude go to C/C++ India group
— Https://t.me/c_cpp_India
— I believe that this is the most beneficial act I've ever seen
— It's beneficial for both groups (I'm talking about people ofc)
— Which is why global varibles are used across multiple differnt functions
— #include<iostream>
#include<conio.h>
#include<string.h>
using namespace std;
int main(){
char word[30];
int lenglth;
char distinct[30];
std::cin>>(word);
int count = 0;
// std::cout<<word;
for (int i = 0; i < strlen(word); i++){
count = 0;
for (int j = 0; j < strlen(distinct); j++){
if (distinct[j] == word[i]){
count++;
}
if (count = 0){
distinct[strlen(distinct)+1] = word[i];
}
}
}
std::cout<<count<<std::endl;
std::cout<<word<<std::endl;
std::cout<<distinct<<std::endl;
if (strlen(distinct)%2 == 0){
std::cout << "CHAT WITH HER!";
}
else{
std::cout << "IGNORE HIM!";
}
return 0;
}
— There is some error in the append can anyone help regarding where is the error