ɛ n h ᴀ n c ɛ ґ 🧟♂️
I’m trying write a program to only accept 10 digits from a user in c++
ɛ n h ᴀ n c ɛ ґ 🧟♂️
If anyone can help with i’d be glad
I’m new to this
Thanks!
YUSUF
Do any one know neural network with c++
'''''''
https://hastebin.com/obujimaxeq.cpp, it says segmentation fault at line 68 in display function? Where did I go wrong?
olli
Anonymous
'''''''
Captain
highest doesn't return anything
You should just call the function instead of printf
Captain
Np
Anonymous
Hi all,I am new to c++
Anonymous
how could I create another main in the file at the same time
Anonymous
I have very small assignment on c++,I want to share media so whom could I write in pm.just need some help
Prince Of Persia
Prince Of Persia
Pradevel (Pratyush)
Anonymous
ɛ n h ᴀ n c ɛ ґ 🧟♂️
Just check the length if it's all at once.
Don’t really get you bro
But what I’ve currently done is declared a string variable (called input) that should hold the user input and also declared an int Variable called “Maxchar”and assigned 10 to to it.
Then the code reads
if (input.size() > Maxchar || input.size < Maxchar)
{cout <<“Error”;}
Anonymous
ɛ n h ᴀ n c ɛ ґ 🧟♂️
Anonymous
Yes bro
Oh, so that's a good way to do it^ if using std::cin.
ɛ n h ᴀ n c ɛ ґ 🧟♂️
ɛ n h ᴀ n c ɛ ґ 🧟♂️
Prince Of Persia
why switch statement is faster than array of function pointers in both optimized and non-optimized codes?
Prince Of Persia
Anonymous
Yes, you are right)
Anonymous
Ибраги́м
https://www.youtube.com/watch?v=Yop9D3V2KBk
Manu
Does anyone know ..where should i learn about functions ?
Prince Of Persia
Kartik
I'm trying to split a string (at whitespace) into 2 parts and storing them in 2 different variables (N and F in my case)
Eg
Input:
abdhfurjs qweyd
Expected output:
part1: abdhfurjs
part2: qweyd
//T is total number of strings to enter and split. Can be ignored!
int main(){
int T;
string str;
string N, F;
int endindex;
char space=' ';
//string N = ' ',F = ' ';
cin>>T;
for (int i = 0; i < T; i++){
getline(cin, str);
}
int z = str.length();
for(int i=0; i < z; i ++){
if(str[i]==space){
endindex=i;
}
}
N=str.substr(0, endindex);
cout<<"part1: "<<N<<endl; //GOING GOOD
F=str.substr(endindex+1, z-endindex-1);
cout<<"part2: "<<F<<endl;. //GOING GOOD
return 0;
}
Kartik
It's working. But is there any better solution/alternative solution to this??
Kartik
I know 1st one...will try. Can you explain about 2nd one?
Kartik
Stringstream
Anonymous
Stringstream
https://en.cppreference.com/w/cpp/io/basic_stringstream
Manu
Manu
📖
I don't have anyone either my clg not start yet ....
Anonymous
Abhishek
Cherno ? Right
Yes one example... There are more like Darek Banas, One Lone Coder... etc...
Manu
Abhishek
Ayomide
Hello everyone, am a beginner programmer learning C++ and C, I want to ask a question please, if I want to create an app the browses, is it a command code in the program that connects the app to the internet? If yes how? and if no how do I do it to connect the app to the internet. I already searched Google but I am just getting redirected to another topic, Thanks for your answers.
Manu
J.
Hello
Prince kumar
Error in do
Prince kumar
Check it
Prince kumar
In do
Rasbabieh
which header file can I use in linux to work as conio.h?
Anonymous
Error in do
You can't write do while loops in global or namespace scope. They must be used within a function or a method.
Anonymous
Yes it is a good book. Use the latest edition
Anonymous
Madhukar
Hi
Anonymous
I thought that the 6th edition was already released but apparently not. You will have to use the 5th edition and then upgrade yourself for changes introduced in C++14, 17 and 20.
I recommend isocpp.org to find the new changes and learn about them from other books or online blogs (there are tonnes of them)
der ðiβüśüɾę
Guys, maybe can you know about compile c++ to exe on linux?
Crow
Crow
I can't find "while()"
Crow
maybe
do{
}while();
klimi
Saleh
Guys, maybe can you know about compile c++ to exe on linux?
https://stackoverflow.com/questions/38786014/how-to-compile-executable-for-windows-with-gcc-with-linux-subsystem Check this, maybe this will be useful (answer there is similar to what you want). Newer tried to do this on Linux for Windows.
der ðiβüśüɾę
der ðiβüśüɾę
Fine, thanks
der ðiβüśüɾę
But wine says
010c:err:module:import_dll Library libgcc_s_seh-1.dll (which is needed by L"Z:\\home\\dibusure\\projects\\passGen\\main64.exe") not found
010c:err:module:import_dll Library libstdc++-6.dll (which is needed by L"Z:\\home\\dibusure\\projects\\passGen\\main64.exe") not found
010c:err:module:LdrInitializeThunk Importing dlls for L"Z:\\home\\dibusure\\projects\\passGen\\main64.exe" failed, status c0000135
der ðiβüśüɾę
That's not fine...
Crow
lol,not fine
der ðiβüśüɾę
I writed x86_64-w64-mingw32-g++ -o main64.exe gen.cpp for compile
der ðiβüśüɾę
and wine cmd for cmd console, and execute main64.exe
Suka
or you can search google for that dll