Anonymous
#include <stdio.h>
int main() {
char ch='a',cha='z';
printf("Enter a character: \n");
scanf("%c",&ch);
do
{
printf("%c\n",ch+1);
ch = ch+ 1;
} while(cha>ch);
return 0;
}
Yazid
Maybe you can change %i to %d, or you can import <stdlib.h>
\Device\NUL
Check what scanf return ?
\Device\NUL
\Device\NUL
If i were you i will get the value to string first, check if all the characters are numbers and then using strtod
Anonymous
Anyone who work on sublime text in c coding
\Device\NUL
Maybe check if the scanf return 0 ?
\Device\NUL
Idk, but text editor or ide shouldn't matter
Vlad
Does the C language work in notepad.exe?
\Device\NUL
I mean value that scanf returned
\Device\NUL
Anonymous
Yes
Vlad
Vlad
It ain't an ide that's for sure
Anonymous
Plz remove timer from my side
\Device\NUL
Yes
https://youtu.be/a-x619wMPGc
Vlad
Lol just use it as an editor and compile in terminal ftw
\Device\NUL
\Device\NUL
I don't know why people is afraid with command line
Ludovic 'Archivist'
Embarcadero strikes back!
Ludovic 'Archivist'
Devc++ is made by Embarcadero
Anonymous
Output not print
Anonymous
It's print only finished in 441ms
Anonymous
😭
Ludovic 'Archivist'
And I am here, waiting for hash table benchmarks to end after 8h
Vlad
When shall the humanity stop using headers for msdos?
\Device\NUL
Ancient Operating System
Vlad
That's the OS api of which you're trying to use for some reason
Vlad
Single task OS
Vlad
With legendary command prompt 😎
\Device\NUL
I use Arch
D:
C:
Vlad
graphics.h is an API for DOS
Vlad
Opengl is a thing
Vlad
SDL could also do the job
Dima
ye but dont use opengl version less than 3.2
Vlad
\Device\NUL
Who still use 32bit and windows 7 these days
Vlad
Works on any GPU that supports it
Vlad
And even then there's software renderers as well for some weirdos
Eshan
hey guys im starting to learn c++ and later dsa for placement. any tips, resources and else for me? i am a complete noob in this before i started to stress, i only use to open my desktop for games. btw nice meeting y'all!
Dark
int mark(int a)
{
if (a>=90 && a<=100){
return 10;}
else if(a<90 && a>=80 ){
return 9;}
else if(a<80 && a>=70){
return 8;}
else if(a<70 && a>=60){
return 7;}
else if(a<60 && a>=50){
return 6;}
else if(a<50 && a>=35){
return 5;}
else
return 2;
}
Dark
Eshan
Dark
Edit the code please
Dark
I couldn't understand
Eshan
int mark(int a)
{
if (a>=90 && a<=100){
return 10;}
else if(a<90 && a>=80 ){
return 9;}
else if(a<80 && a>=70){
return 8;}
else if(a<70 && a>=60){
return 7;}
else if(a<60 && a>=50){
return 6;}
else if(a<50 && a>=35){
return 5;}
else{
return 2;
}
Dark
Ohh
Dark
Okay thanks
Eshan
and one more to complete
Dark
What
Eshan
int mark(int a)
{
if (a>=90 && a<=100){
return 10;}
else if(a<90 && a>=80 ){
return 9;}
else if(a<80 && a>=70){
return 8;}
else if(a<70 && a>=60){
return 7;}
else if(a<60 && a>=50){
return 6;}
else if(a<50 && a>=35){
return 5;}
else{
return 2;}
}
Dark
Okay
Eshan
can i pm u?
Dima
Eshan
lmao it works haha
Eshan
i am wrong :)
Ankit
Can anyone provide me the notes of file handling in c++?
Jollybox.h
Does anyone have pdf of "Programming: Principles and Practice Using C++ (Bjarne Stroustrup)" ?
Abhi
Anyone give me Java notes in pdf please
mahdi13
hi
can I make a executable file with this:?
g++ filename.cpp -o resultant
Jollybox.h
physical book is not sold in my country.
mahdi13
mahdi13
mahdi13
but I want to know how to make executable with click
mahdi13
Sonny
I have some networking code that uses inet_ntoa() to convert the received address into a string. Running it on localhost, I was expecting any one of 127.0.0.1, 0.0.0.0 or 192.168.1.xxx but instead it returns 203.43.102.189. I have no idea what that address is... any ideas? My call to the function looks like this:
port = ntohs(sin->sin_port);
strcpy(ip, inet_ntoa(sin->sin_addr));
printf ("Connection from %s:%d\n", ip, port);
Brown
Hi, anyone familiar with websocket using c++
Brown
Server side
sasha
Hi, I have a problem using std::execution, Clion throws the following error:
fatal error: tbb/blocked_range.h: No such file or directory
19 | #include <tbb/blocked_range.h>
| ^~~~~~~~~~~~~~~~~~~~~
I tried to solve this problem by adding this line to the CMakeList target_link_libraries(test PUBLIC tbb)
But nothing helped
Talula
Server side
Bad idea... PM me if you have options... if it is going to be C++ then don't.
Talula
Ho
Hi anyone familiar with data structure?
sasha