Anonymous
if (file1 == NULL) { printf("No file!"); } else { while (!feof(file1)) { for (int i = 0; i < MAXSIZE; i++) { number1 = getc(file1); printf("%c", number1); } } }
Anonymous
uint_8 number1 is defined
klimi
uint_8 number1 is defined
You mean uint8_t?
Anonymous
Yes sorry
Anonymous
I want sum numbers in file1 and file2 with uint8_t. When it run, it prints file1 and file2 numbers. But should i add an array or sth like that? I dont know.
Shvmtz
std::make_pair vs initializer list ? Which one is preferred in such case ? std::pair<int, int> find() { . . return std::make_pair(l0, r0); } std::pair<int, int> find() { . . return { l0, r0 }; }
klimi
Or if it is only simple addition you could implement it as array, I guess
Sudheerthan
Input :- A[10]= {2,5,2,6,2,7,8,2,3,2} , output :- A[10] = {5,6,7,8,3,2,2,2,2,2},. How !??
Talula
Input :- A[10]= {2,5,2,6,2,7,8,2,3,2} , output :- A[10] = {5,6,7,8,3,2,2,2,2,2},. How !??
Pick anything above 5 and anything below 5 add it to the end... for sure it is not sorted.
Anonymous
how can i become the tiktok api ?
Ибраги́м
Here we go: https://gcc.godbolt.org/z/rb7KnGcEn
Ибраги́м
https://developers.redhat.com/articles/2022/01/12/prevent-trojan-source-attacks-gcc-12
Anonymous
Anonymous
Hi! How can i print a shape in c++
Abu
hy please send program date class in c++
Sudheerthan
Input to what?
We give Input as A[10]= {2,5,2,6,2,7,8,2,3,2} ,then output must be all 2 is in the end section,
Hunter
Pick anything above 5 and anything below 5 add it to the end... for sure it is not sorted.
i was thinking of the same thing we have to arrange like 56784321
Anonymous
Can sb say how can i print a shape in c++
Anonymous
2021 version
Anonymous
Given an array having only two types of elements i.e. 1 and 0. Now replace 0 with 1 such that it's adjacent number is not 1. input [1,0,0,0,1] output [1,0,1,0,1]
Anonymous
I just need an approach and then I'll code myself 😃
Anonymous
Just a loop with checking neighbouring numbers will be fine I think
But what about the first &last element? They have 1 missing neighbour
\Device\NUL
\Device\NUL
If not just check change the odd index (array index are from 0)
klimi
nope... it's common point in the mandelbrot set
Anonymous
?
Burak
I installed mingw and added in system variables but it still doesn't work on vs code. I still can't run my cpp code in vs code. Which configuration should I have to add in lauch.json?
Burak
no worries! I solved the problem. I just applied the mingw path to wrong system variable field.
Anonymous
std::make_pair vs initializer list ? Which one is preferred in such case ? std::pair<int, int> find() { . . return std::make_pair(l0, r0); } std::pair<int, int> find() { . . return { l0, r0 }; }
The initializer list is preferred because it is less verbose and is also more RVO (return value optimization) friendly though a good compiler maybe able to optimize both the cases.
Anonymous
https://developers.redhat.com/articles/2022/01/12/prevent-trojan-source-attacks-gcc-12
If only Hebrew and Arabic used left to right scripts like the rest of the world....
Anonymous
Hi
Nana
Guys how do I create a separate class specification and class implementation c++
Nana
pls I need an example with a sample program
Anonymous
How i can make a file manager with c++
mito
Hi! How can i print a shape in c++
in terminal ? graphical ? specify where to print.
Potato
If you have java group please send invite to me private
Potato
I just finished java object oriented in my college and i want to practice on it more where or how can i do that
Potato
I want to master java
Anonymous
Why
Liam
It's another Fred.
Anonymous
It's another Fred.
Alright, thanks
Anonymous
Here we go: https://gcc.godbolt.org/z/rb7KnGcEn
Your example however is quite not what the article implies but
Ибраги́м
Rain Bow
hello
Rain Bow
how to store users information using file processing
Golu
Write a program to multiply and add two 2D arrays .
klimi
In c
sounds like an assigment, you should do it
Lordicit
Pls can some one help how can I create this program without using function and procedure
Lordicit
???
Lordicit
@OxFFFFFFFF pls help me
Ибраги́м
@OxFFFFFFFF pls help me
Read the rules, that's a long code.
Bunnv
If anybody need dsa or cp or development courses. Direct message me
Anonymous
Hello
as
how can i define malloc strings array which have 50 char
as
what do you mean
char **veridizisi[50] = malloc(sizeof(char*))
as
veridizisi[0] = "21312";
Kadlu
Hello guys, I need help wich Linux
Kadlu
Yes what
How make for terminal interprete notepad?
Lordicit
How make for terminal interprete notepad?
You. Want to use notepad on your Linux distro
Kadlu
Bro, If you don't understand me, because I'm brazillian
Rain Bow
How to store information using file proccesing am using notepad in C
Kadlu
To give permission negate
John
Hello, I need help on how to use select() with udp socket, small example will help, serverside only
John
Anonymous
Yaha pe koi Leetcode krta he to pm me
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(); }
Compiler🇮🇷
We know the cost of going from one city to another, which has the lowest cost, starting from one city and passing through all the cities exactly once and starting to the city. But it does not give the output I want.
Deepak
/get cbook