Talula
yes, to handle multiple clients
Hmm... not the best idea because you'll have handle threading too..
Anonymous
hello all
Anonymous
I guess I'd get enough help to pass my masters degree here
Anonymous
The example is from the article.
Well I was using a browser which detects bidirectional Unicode content (brave) and hence found that example a little too obvious to a reader when embedded inside a string. But on switching to another browser, I found out that it was still pretty much the same like other examples. https://github.com/nickboucher/trojan-source/tree/main/C
Jamil
What projects I can make with C.
Pavel
What projects I can make with C.
Any, you can write almost anything in C (a lot of it would not make sense though), I think you need to narrow your question a bit.
Pavel
By the way, really, what you can not write in C?
I use Arch
By the way, really, what you can not write in C?
Webpage? You can use C for writing a HTML wrapper but it will not be C itself
Pavel
Webpage? You can use C for writing a HTML wrapper but it will not be C itself
You can write a webpage/website in webassembly I guess 🤔 I mean it would probably be not very efficient effort investments, but theoretically can be done
\Device\NUL
I'm using xed as notepad on GNU/Linux machine
Kadlu
Wat ?
Nothing bro, are ok
Anonymous
Guys I need your help.... I need an explanation about Big O notation
Will
Guys I need your help.... I need an explanation about Big O notation
I would definitely suggest checking out Wikipedias site for this
Will
https://en.m.wikipedia.org/wiki/Big_O_notation
Anonymous
Thanks
Mohamett
🙏
alice
Can any one tell me main difference between this two functions prototypes void printSales (const int theArray[REGIONS] [PRODUCTS]); void printSales (int theArray[REGIONS] [PRODUCTS]);
Prince Of Persia
Can any one tell me main difference between this two functions prototypes void printSales (const int theArray[REGIONS] [PRODUCTS]); void printSales (int theArray[REGIONS] [PRODUCTS]);
constant you can only use void printSales (int theArray[REGIONS] [PRODUCTS]); by a non-constant array but in other hand you can use void printSales (const int theArray[REGIONS] [PRODUCTS]); by both constant and non-constant arrays (but if you have the both functions in the same time you have to use const_cast to send a constant array to the second function
Prince Of Persia
how to type cast ?
like these examples const int a[] = {123,123}; auto b = const_cast<int*>(a); or int a[] = {123,123}; auto b = const_cast<const int*>(a); but in first example I do know nothing about neither safety nor it is correct to do so
Prince Of Persia
bro for two d array
int a[][2] = {{},{123}}; using arr2 = int[2]; auto b = const_cast<const arr2*>(a); something like this
Anonymous
Hii
Prince Of Persia
Can u pls tell me how it works arr2*>(a)
it is equal to int a[][2] = {{},{123}}; auto b = const_cast<const int(*)[2]>(a); let me explain this code rather than that one the first line is our array(here it is called 2d array) second line creates a pointer to arrays which have 2 elements. or in other words, it creates a pointer to elements of a which the pointer is const (const_cast can change constantness of pointer(or array)) we can use b as an array too (because it points to the same address that a does)
•‿•
anyone here know about graphic in c ?
•‿•
give me some reference , books for graphical learning in c
\Device\NUL
•‿•
any specific book while i follow for that?
\Device\NUL
What projects I can make with C.
Create library to handling big integer
Anonymous
Any crypto users in here?
Kadlu
Good morning guys
Liam
Good morning guys
Good evening bro.
Prince Of Persia
Thankyou buddy
You're welcome
Anonymous
I use Arch
Hello. Can I somehow find out that function was called last time? eg: func(); // - func(); // - func(); // Last time! My idea is to create a macro that will count calls while preprocessing. But I don't know how to create it. P.S. Static variable with destructor inside function is not what I need, checking should be done while function call, not when application closes
Compiler🇮🇷
Are you andrestand?
klimi
what?
klimi
use english please
Prince Of Persia
use english please
He's trying
klimi
He's trying
cool but i cannot understand him
Prince Of Persia
cool but i cannot understand him
Ok let me help you He is saying I want some help in oiler's graph(idk what's that) in code
Compiler🇮🇷
use english please
Euler Graph Topic Do you know?
klimi
eulerian graph?
Prince Of Persia
klimi
okay yeah, i do know that
Compiler🇮🇷
klimi
Pleas help me
yeah... but like... what do you want me to help you with?
Compiler🇮🇷
yeah... but like... what do you want me to help you with?
We have a number of cities and we know how to go straight from one to another. It is desirable that the least expensive route starts from one city and passes through all cities exactly once and returns to the starting city, so I have to code from the Eulerian graph I did not eat but it did not give the right output. Can you help me?
Compiler🇮🇷
with what exactly? if you just want me to write you all the code I politely refuse
No, I wrote the code but I do not know where the problem is
Compiler🇮🇷
#include<stdio.h> #include<conio.h> #include<iostream> using namespace std; int c = 0,cost = 999; int graph[4][4] = { {0, 10, 15, 20}, {10, 0, 35, 25}, {15, 35, 0, 30}, {20, 25, 30, 0} }; void swap (int *x, int *y) { int temp; temp = *x; *x = *y; *y = temp; } void copy_array(int *a, int n) { int i, sum = 0; for(i = 0; i <= n; i++) { sum += graph[a[i % 4]][a[(i + 1) % 4]]; } if (cost > sum) { cost = sum; } } void permute(int *a, int i, int n) { int j, k; if (i == n) { copy_array(a, n); } else { for (j = i; j <= n; j++) { swap((a + i), (a + j)); permute(a, i + 1, n); swap((a + i), (a + j)); } } } int main() { int i, j; int a[] = {0, 1, 2, 3}; permute(a, 0, 3); cout<<"minimum cost:"<<cost<<endl; getch(); }
artemetra 🇺🇦
why are asking that in a C++ group? it's totally offtopic, read the rules
Nothing
Hello everyone I want to learn c++ Can u give the best course for it
Jack ⁧3
input 3+2+1 output 1+2+3
Jack ⁧3
input 3+2+1 output 1+2+3
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; void print(vector<int> v, int n) { for (int i = 0; i < n; i++) { if (i == n - 1) { cout << v[i] << "\n"; return; } cout << v[i] << "+"; } } int main() { vector<int> v = {}; string s; cin >> s; int n = (s.length() + 1) / 2; for (auto x : s) { if (x != '+') { v.push_back(std::stoi(x)); } } sort(v.begin(), v.end()); print(v, n); }
Abhishek Gupta
#include<stdio.h> #include<string.h> int main() { char s1[50] = "Harry"; printf("After reversing string is =%s", strrev(s1)); return 0;} //Output: After reversing string is = yrraH Please help me . I getting error in this code ..
_
how can i make my own library in c?
R
how can i make my own library in c?
file.h include <file>
R
really
🙂🙃
I use Arch
how can i make my own library in c?
Depends on library type. Do you want a header-only lib (Rakhim's variant), shared library (.dll/.so) or static library (.lib/.a)?
Hima
Please solve that problem..
Implement your own strrev if your compiler is gcc.
_
🙂🙃
do you really know how to do so,, if so please help