klimi
sure
tb
klimi
sure
tb
with vb instead?
tb
i mean, why should one choose to use c++ instead of c#?
tb
what do you mean with "to deal with outdated mono/.net"?
Abdelrhman
I need help please
klimi
the last version which mono supports is like 5
Anonymous
with c# may i do gui apps on linux?
Like @K11M1 said it is possible to do GUI development with C# on Linux but I am not sure why you would do that. And @K11M1 already mentioned about Mono not supporting the latest version of .Net core or C#. Your original question was about Windows and that is what my reply pertains to
tb
I've understood,
but about the first book to read to learn c++ which do you personally think would be the best one for a person who has never programmed seriously and who is an absolute beginner who doesn't know almost anything? (I've already read the stackoverflow page, but there are anyway too many choichable books 😅)
Gabriel
What about divide-and-conquer algorithms based like quiksort in the question of stack smash event? This can heapens or not?
Saurabh
Anyone up?
Melbgm
Hi guys, how can I give an infinite loop to my switch case code
The program should continue until the user selects exit.
coal
Melbgm
coal
how did you manage to break out of a while true loop without leaving manually
Melbgm
Melbgm
what should i do ?
Nomid Íkorni-Sciurus
Melbgm
thanks it worked but it doesn't give me the menu it just gives me one of my cases that i choosed how do i fix this ?
coal
did you
coal
update the input of the choice within the loop
Abdelrhman
Write a program of school reservation which ask a user to enter
(name, educational level) Where tuition fees:
▪ Nursery
10000
▪ Primary
15000
▪ Preparatory
▪ Secondary
20000
22000
There is a discount for brothers, if 2 brothers add discount 10%, more than 2, the discount reach to 15%. Note: discount percentage on the total.
Print out
1. Register for three brothers (nurseray&2primary), print the cost.
2. Register for two brothers (primary & secondary), print the cost.
4. A number of students in every level.
3. Register for three brothers (nurseray&2 preparatory), print the cost.
Abdelrhman
I need some help to write the project
Abdelrhman
It's c++
klimi
Abdelrhman
klimi
This
That's an assigment
klimi
I am asking what you need help with
Abdelrhman
klimi
So what's the problem you need help?
Abdelrhman
Abdelrhman
I try but I can't solve it
Abdelrhman
Can anyone will help me?
Abdelrhman
klimi
You haven't even stated your problem clearly... Saying "I tried and it doesn't work , wrote it for me" doesn't say anything informative
Abdelrhman
I'm really tried
Abdelrhman
But it doesn't work
klimi
I'm really tired too
klimi
Well that's too bad that it doesn't work
Abdelrhman
I think there are some error in code
klimi
As I said, if you won't state the problem clearly anyone will be hardly able to help you
Abdelrhman
MIX of algorithm and Int nbOfBrothers;
cout<<"enter the number of brothers :"; cin>>nbOfBrothers;
int levels [nbOfBrothers];
int costByLevel[4] = { 10000,15000,20000,22000\ ;
int totalCost =0 ;
for(int i=0 ; i<nbOfBrothers; ++i)
{
cout<<"enter the level of the brother number
"<<i<<" :";
cin>>level[i]; totalCost +=( costByLevel [level[i]); }
// Now, calculating the discount :
int discount =0
if ( others==2,
discount =10 ;
if( Brothers>2)
discount =15
int finalCost = totalCost -
totalCost*discount/100; cout<<finalCost<<<endl;
//This is not finish. You nées to store thé name of students, there level and then print thé number of students of each level.
Abdelrhman
This is my solve
Abdelrhman
I need heeeeeeeelp
Anshul
CALVIN
CALVIN
totalCost*discount/100; cout<<finalCost<<<endl;
Would be more better if you introduced brackets here👆
Anonymous
Hey guys,
I wanted to know that how can I get an string from user without length limit in C?
I'll really appreciate it if you write the code piece too 🙏🏻.
Talula
Mikhail
Mikhail
i didnt wrote on c for more than year but as i know this works
Igor🇺🇦
char* str;
gets(str);
Never use gets. It's unsafe and even was removed from C++ for that reason. And your implementation without allocation will cause undefined behavior.
Anonymous
We can use fgets
coal
Anonymous
fgets(string,lengthofstring,stdin);
coal
Hey guys,
I wanted to know that how can I get an string from user without length limit in C?
I'll really appreciate it if you write the code piece too 🙏🏻.
#include <stdio.h>
#include <stdlib.h>
char *inputString(FILE* fp, size_t size){
//The size is extended by the input with the value of the provisional
char *str;
int ch;
size_t len = 0;
str = realloc(NULL, sizeof(*str)*size);//size is start size
if(!str)return str;
while(EOF!=(ch=fgetc(fp)) && ch != '\n'){
str[len++]=ch;
if(len==size){
str = realloc(str, sizeof(*str)*(size+=16));
if(!str)return str;
}
}
str[len++]='\0';
return realloc(str, sizeof(*str)*len);
}
int main(void){
char *m;
printf("input string : ");
m = inputString(stdin, 10);
printf("%s\n", m);
free(m);
return 0;
}
coal
allocate with a start value and reallocate as soon as the string goes up to the initial max length
Mystic
Can anyone suggest a course for C++ for beginners to advanced
\Device\NUL
Oyeesan
Hi guys, am new here I need tutorial c++, am a begineer pls
.
I use Arch
coal
Aryas
Hi everyone
I have cloned a source code from github and it contains a Makefile in it and as I searched for I realized that for using from Makefile I should run "make" in terminal and I got these errors that doesn't find clang but I have installed clang before. Can you please help me?
make -C third_party/SVDLIBC
make[1]: Entering directory '/home/aryas/Desktop/anchor/third_party/SVDLIBC'
clang -Wno-deprecated-writable-strings -O3 -c main.c
make[1]: clang: No such file or directory
make[1]: *** [Makefile:11: main.o] Error 127
make[1]: Leaving directory '/home/aryas/Desktop/anchor/third_party/SVDLIBC'
make: *** [Makefile:56: third_party/SVDLIBC/libsvd.a] Error 2
coal
Aryas
coal
sadness
coal
the makefile is broken or the context you're running it in does not provide a path
Aryas
yeah it could be. I'll check this. Thanks
Anonymous
Hi
Anonymous
What is c++ programming
Anonymous
Hi
Igor🇺🇦
What is c++ programming
Is this a serious question? 🤔
That's the name of the group. It's written up there.