Anonymous
But afaik it doesn't exist
jot.rs
Nope the exact opposite
I still don't get what you mean, sry
Artöm
int MAKE_ID("i") = 0; ++i;
Artöm
Thats no use imo
Anonymous
int MAKE_ID("i") = 0; ++i;
That wouldn't work my guy
Artöm
I dont need it anyway
Anonymous
Thats no use imo
There are use cases for it you just didnt come across one
Artöm
Good for me. Wouldnt want to
Anonymous
Igor🇺🇦
There are use cases for it you just didnt come across one
Can you please demonstrate cases when you need this feature?
Anonymous
Can you please demonstrate cases when you need this feature?
Going to be a bit specific but recently i wrote a formant speech synthesizer in which i needed to parse phonemes and match them with the members of the voicebank struct's members, which are named accordingly with the phonemes
Anonymous
There you have your example
Anonymous
But if something like i mentioned above existed i think it would have been simpler, that's all.
Pavel
is there a way to force passing my object by reference to a template function that accepts a deduced parameter by value? I have a variadic template function that accepts a pack of deduced values like template<typename... Args> void MyFunction(Args... args) {...} and I want to decide whether my arguments should be passed by reference or by value when I call this function
crt
well libcurl is broken for me
crt
curl_easy_perform is trying to read from stdin
Igor🇺🇦
Going to be a bit specific but recently i wrote a formant speech synthesizer in which i needed to parse phonemes and match them with the members of the voicebank struct's members, which are named accordingly with the phonemes
It didn't actually make it more clearer how would you use is in code 🤷‍♂️. But Okay. I'm trying to avoid using macros as much as possible. They are "bad"
Anonymous
matching the parsed phonemes, which are strings, with the struct members.
in this case macros wouldn't be "bad" lmao
Pavel
std::ref
thanks, exactly what I need
Epem
Sasriyakal
Lelouch
Sasriyakal
Sat shri akal *
Dima
English only please
Epem
Sat shri akal *
colloquial bro!
klimi
._.
Anonymous
Hello
Anonymous
Anybody here
Dima
No
Dima
Anonymous
/report @nimeteee pm'ing shit things ;-;
rakshith
#include<stdio.h> void main() { char STR[100],PAT[100],REP[100],ans[100]; int i,j,c,m,k,flag=0; printf("\nEnter the MAIN string: \n"); fgets(STR,sizeof(STR),stdin); printf("\nEnter a PATTERN string: \n"); fgets(PAT,sizeof(PAT),stdin); printf("\nEnter a REPLACE string: \n"); fgets(REP,sizeof(REP),stdin); i = m = c = j = 0; while ( STR[c] != '\0') { // Checking for Match if ( STR[m] == PAT[i] ) { i++; m++; flag=1; if ( PAT[i] == '\0') { //copy the REP string to ans string in the place of pattern matching. for(k=0; REP[k] != '\0';k++,j++) ans[j] = REP[k]; i=0; c=m; } } else //mismatch { ans[j] = STR[c]; j++; c++; m = c; i=0; } } if(flag==0) { printf("Pattern doesn't found!!!"); } else { ans[j] = '\0'; printf("\nThe RESULTANT string is:%s\n" ,ans); } }
rakshith
In this program why string not replaced
rakshith
Help me to fix this program folks.
Элвин
Hey can anyone help me?
Элвин
1)Create a program to receive 4 rows from the user and print each row in ascending order. - i cant witte this code
rakshith
Plz..... Anyone
klimi
/report @nimeteee pm'ing shit things ;-;
@nimeteee you have broken the rules several times, are you aware?
klimi
@nimeteee you have broken the rules several times, are you aware?
I give you 5 minutes @nimeteee if you don't explain yourself within those 5 mins you will be banned without mercy, I know you are online btw
klimi
@nimeteee Times up
klimi
Oh no.... ... But I wanted to warn two times
Sameer
Hey i have a question its not from any live challenge....
Sameer
How can i get back to a string after changing its vowel to *
Sameer
Eg.VOWEL----V*W*L V*W*L---VOWEL
Sameer
Eg.VOWEL----V*W*L V*W*L---VOWEL
No copy of strings is allowed
rakshith
Anyone plz...
rakshith
It's urgent
Daniele
How can i get back to a string after changing its vowel to *
you process the whole array in a loop and with a switch check if the current char is one of the 5 vowels (capital or not)
Sameer
you process the whole array in a loop and with a switch check if the current char is one of the 5 vowels (capital or not)
How would i come to know that they will be at the same position....consider INDIA as string
Daniele
How would i come to know that they will be at the same position....consider INDIA as string
you don't need to, you are using a loop and a switch case block checking every single char of the string
Daniele
a string is simply an array of chars
Francisco
How can i get back to a string after changing its vowel to *
You can't, unless you save the vocals in order somewhere else
Sameer
You can't, unless you save the vocals in order somewhere else
Exactly.....so how that can be implemented??
Sameer
you don't need to, you are using a loop and a switch case block checking every single char of the string
I have tried this....but it fails at some test cases....where same vowels are present
Francisco
But you can't guess the vowels if you don't save them somewhere else
Daniele
I have tried this....but it fails at some test cases....where same vowels are present
you are either doing the loop wrong or you are not checking for capitals
Daniele
consider the following
Francisco
If you save them, then it's just a question of looping through the saved vowel and assign then to their position
Sameer
Daniele
for (i = 0; i < sizeof(string); i++) { switch (string[i]) { case 'a': string[i] = ' '; break; case 'e': string[i] = ' '; break; case 'i': string[i] = ' '; break; case 'o': string[i] = ' '; break; case 'u': string[i] = ' '; break; } }
Daniele
this should work
Daniele
you can replace sizeof(string) if you already know the size of your string
Daniele
he just needs to replace every vowel with a space, right?
Daniele
How would it work??
it checks every char of the string if it is a vowel
Sameer
he just needs to replace every vowel with a space, right?
No.....the example is INDIA---*ND** and then to INDIA
Daniele
mmmmm
Daniele
use a support array then
Sameer
it checks every char of the string if it is a vowel
I know how to do this😂not a beginner
Sameer
use a support array then
Without using that....no references should be used