Gleb
Hi guys, has anyone here used Takion Developer API, which is on C++?
I wasn’t able to able any documentation, so was seeking for an advice how to proceed...
Chinaka
Anonymous
Hi everyone,
Can you recommend boost.asio courses, tutorials and books?
ninja
check the documentation of boost.asio... and is your project for learning you can also check POCO lib
ninja
if*
M
#include<stdio.h>
int main()
{
char j =1;
while(j <= 255 ){
printf("%d", j);
j++;
}
return 0;
}
Anonymous
M
What is the reason for infinite loop
M
Can anyone tell me the reason it went like this
ninja
use int!
M
I know
M
But why when I chose char
M
Goes like this
Anonymous
Goes like this
char data type can only accept a value between -128 and 127, look at the while condition again.
M
So when it got value more than 127 that bring us back to _128 like a circle 400 degree is equal to 40
M
Ohhhh I understood
M
Sorry for my stupidity
Anonymous
How to learn c/ c++ from scratch??
Li
#include <iostream>
#include <vector>
using namespace std;
class Stack
{
private:
string elems;
public:
bool empty() const
{
return elems.empty();
}
};
int main()
{
vector<int> b;
Stack test;
b.push_back(1);
cout << b[0] << endl;
bool a;
cout << "a = " << a << endl;
return 0;
}
I don't know why the "a" output a number which greater than zero. And if I don't use the "b.push_back" then the "a" output zero.
Sandeep
Li
wow! thanks!
Kenny
good morning, i need to improve efficiency in knapsack problem with backtraking, i've already use pesimistic and optimistc bounds, some ideas?
Diego
It's not morning for me, so I guess I don't have any ideas
Anonymous
Sandeep
Box of
anyone know how to resize linux terminal with ncurses?
Anonymous
welp i got my memory socket working, i just used my Ordered_Access implementation that i use for my instruction pipeline :) https://wandbox.org/permlink/1gj1HlCIlmsdh3S5 (no idea why i did not think of that earlier)
Anonymous
#include <iostream>
Using namespace std;
Int main(){
String text[ ]={"house","money","jetin"}
For(int b=0;b<3;b++){
For (int I =5;I>0;I--){
Count<<text[b][i]<<flush;
}
}
}
Please Am trying to reverse each of the words but
I get a debug assertion failure error
Rakesh
Anonymous
Anonymous
https://wandbox.org/permlink/HN1rTvvYzswG9Hho how would i turn this into a non blocking function?
•‿•
Write a program to find greater of four number entered by user ?
•‿•
i have this question i wrote a code i want a correction can anyone help me
•‿•
Write a program to find greater of four number entered by user ?
#include <stdio.h>
int main()
{
int a,b,c,d ;
int num;
num=a,b,c,d ;
printf("Enter your number a \n ");
scanf("%d", &a);
printf("Enter your number b \n ");
scanf("%d", &b);
printf("Enter your number c \n ");
scanf("%d", &c);
printf("Enter your number d \n ");
scanf("%d", &d);
if (a>b)
{
printf("%d is high number \n");
}
else if (b>c)
{
printf("%d is high number \n");
}
else if (c>d)
{
printf("%d is high number \n");
}
else
{
printf("%d is high,number");
}
return 0;
}
Abhishek
#include <stdio.h>
int main()
{
int a,b,c,d ;
int num;
num=a,b,c,d ;
printf("Enter your number a \n ");
scanf("%d", &a);
printf("Enter your number b \n ");
scanf("%d", &b);
printf("Enter your number c \n ");
scanf("%d", &c);
printf("Enter your number d \n ");
scanf("%d", &d);
if (a>b)
{
printf("%d is high number \n");
}
else if (b>c)
{
printf("%d is high number \n");
}
else if (c>d)
{
printf("%d is high number \n");
}
else
{
printf("%d is high,number");
}
return 0;
}
Sure
Ибраги́м
https://www.youtube.com/watch?v=u8Mc_WgGwVY
Abhishek
#include <stdio.h>
int main()
{
int a,b,c,d ;
int num;
num=a,b,c,d ;
printf("Enter your number a \n ");
scanf("%d", &a);
printf("Enter your number b \n ");
scanf("%d", &b);
printf("Enter your number c \n ");
scanf("%d", &c);
printf("Enter your number d \n ");
scanf("%d", &d);
if (a>b)
{
printf("%d is high number \n");
}
else if (b>c)
{
printf("%d is high number \n");
}
else if (c>d)
{
printf("%d is high number \n");
}
else
{
printf("%d is high,number");
}
return 0;
}
Use array of size four instead of using single variable and compare among elements.
Abhishek
•‿•
Thanks
Anonymous
€
someone help me , why it repeat 2 times when i run it ?
€
#include <stdio.h> int main () {
char ch ;
do {
fprintf(stdout,"\nr) register a patient : \n"); fprintf(stdout,"\ns) search for a patient : \n"); fprintf(stdout,"\nD) discharge for a patient : \n"); fprintf(stdout,"\nL) list patient by age : \n"); fprintf(stdout,"\nx) exit the program : \n");
fprintf(stdout,"\nchose a option: ");
fscanf(stdin,"%c",&ch);
€
switch(ch) { case 'R': case 'r' : fprintf(stdout,"\nyou have chosen registerin ");
break; case 'S': case 's' : fprintf(stdout,"\nyou have chosen ssearchin");
break; case 'D': case 'd' : fprintf(stdout,"\nyou have chosen discharge\n");
break; case 'L': case 'l' : fprintf(stdout,"\nyou have chosen listin");
break; case 'x': case 'X': fprintf(stdout,"\nyou chose exit\n");
break; default : fprintf(stdout, "\ninvalid option\n"); }while (ch !='x');
сумбула
Anonymous
Anonymous
Format your code
Anonymous
Pavel
What is the best way of organizing code/tests/examples of a C++ library (header-only) in a git repository?
Do you know some good examples, or maybe there are some conventions exist?
Anonymous
Pavel
https://github.com/Neargye/magic_enum
Hmm, I'm thinking whether it's a good idea to put the headers directly into "include" folder, especially if there are many of them, because then you have only two choices for include paths:
"some_stuff.h"
or
"repo_name/include/some_stuff.h"
The first is too short and can collide, unless I include some prefix to every file name, the second is kind of ugly
Anonymous
Pavel
Pavel
some_stuff/some_stuff.hpp is not better
In case of the only header, yes, but in my case I don't have anything named with the same name as my repo.
Like
raccoon-ecs/System.h
raccoon-ecs/Entity.h
...
Anonymous
GHAMDAN_NSHWAN
Any questions in the c++language
Send me.....
Anonymous
Alfredo
You might want to read the rules
Distac_221
better you make your own and ask for suggestion..and delete this message before you got banned
Vineet
Hello all!
I want to learn C/C++
Know some very initial concepts, finding hard to learn further
Any suggestions?🙏
Abhishek
Abhishek
Follow this blog you'll find all the relevant information
Hirrolot
I would not recommend any websites for C/C++ learning
Hirrolot
They are often full of mistakes and misconceptions
Hirrolot
https://www.geeksforgeeks.org/arrays-in-c-cpp/
> Array declaration by specifying size
// With recent C/C++ versions, we can also
// declare an array of user specified size
int n = 10;
int arr2[n];
We can't always do it in C11 and onwards anymore since VLA is optional
Hirrolot
> Name of the array is also a pointer to the first element of array.
It's a common misconception too:
int array[10];
// 40 --- 8
printf("%zd --- %zd\n", sizeof(array), sizeof(&array));
Hirrolot
https://www.pearson.com/us/higher-education/program/Prata-C-Primer-Plus-6th-Edition/PGM4399.html
C Primer Plus, 6th Edition is good enough for C beginners
Devjit
Can somebody explain me about loops in C programming
Hirrolot
Anonymous
Hi
Anonymous
Have any one cracker here!?
Anonymous
It means Crack vps
Anonymous
Crypto
Anyone know how I can start with this algorithm? What steps I have to make sure is in my code? And what runtime
Suppose graph G is an undirected graph with unweighted edges. The graph G contains several cycles, and no two cycles share an edge. Provide an algorithm that outputs the length of the longest cycle in G and prints the vertices belonging to that cycle. Justify the runtime of O(V + E)