menu

Recent questions tagged c

2 votes
2 answers
How to use C++ code together with C? main.cpp #include "hslocallib.h"int main(int argc, char argv) { const char inpath = argv; unsigned int length; readInputData(inpath, &length); r ...
by hauptling
asked Sep 24, 2021
1 vote
2 answers
How to read multiple variables in C? Hello! I am currently solving problems in programming, learning. I came across a problem that reads 3 variables: width, height, depth. This is how I read them: data_in ...
by rifat2125
asked Sep 24, 2021
1 vote
2 answers
How to create a program to translate from 8-digit SS to 10-digit? We need a program that allows you to convert a number from octal to decimal. The programming language is C, but you don't have to write code. I just need to understand ...
by Alexandr_202
asked Sep 24, 2021
1 vote
1 answer
How to convert a word into an array of c++ letters? There is a word which is already an array element, we need to convert this word to a new array of letters, it would be nice if we had wordik where i is the number of ...
by Durilka96
asked Sep 24, 2021
1 vote
3 answers
Passing argument 1 of ‘fwrite’ makes pointer from integer without a cast? Hello. I have a variable of integer type with a value of 7. I am trying to write this variable to a text file with fwrite(); Here's the code: int size = 7;FILE fp;fp ...
by WalterBlack
asked Sep 24, 2021
1 vote
2 answers
I can't compile a .c into a .exe, what do I do? I have a .py code, with cython I made it into a .c, using the command gcc -c name.c, I get the following error: fatal error: Python.h: No such file or directory #includ ...
by kokapuk
asked Sep 24, 2021
1 vote
1 answer
How do I correct the invalid controlling predicate error? I do not understand what the problem is? volatile bool flag=false; #pragma omp parallel for shared(flag) for (int i = 0; x < b; i++) { if(flag) c ...
by jeyyykeyyy
asked Sep 24, 2021
2 votes
2 answers
Can't write the value in SI? Hello. I'm starting to learn SI. I made a calculator and in the endless loop every time I am asked to enter a certain character from the keyboard into the delimetr varia ...
by WalterBlack
asked Sep 22, 2021
1 vote
3 answers
Character representation in char? I apologize for the possibly stupid question. Characters in ASCII are encoded with values from 0 to 255 (256 total). The symbol has a code of 206. If you take out ch ...
by jfaFan
asked Sep 22, 2021
1 vote
1 answer
Why is it possible to put more than N elements into an array of size N? there is an array char az = "123456789-" I need to make a slice of this array . for this I wrote a function char get_slice(char input,size_t input_len,int a, int ...
by Zuoya
asked Sep 21, 2021
1 vote
1 answer
How do I compare each element of an array to all the other elements? Under the terms of the problem given array, the size I choose myself, took 10. The goal is to output the number of repeated array elements in the definition area from m1 ...
by Alexandr_202
asked Sep 20, 2021
1 vote
1 answer
How can I display the values of a function that lie in the interval a>b>c and calculate their number? Good afternoon,faced with a problem, there is a mathematical example (I have already written it in code) and I need it to display the function values that lie in the int ...
by FlapsBat
asked Sep 20, 2021
2 votes
7 answers
Are classes possible in C? Is it physically possible to implement a structure-based oop with encapsulation, inheritance and polymorphism in C? ...
by Anther
asked Sep 20, 2021
1 vote
1 answer
How do I throw exceptions when working with try catch? What is the right way to handle exceptions when allocating dynamic memory? like this? void foo() { int smth = new int100; try { if (5 < 4) { ...
by hauptling
asked Sep 20, 2021
1 vote
2 answers
How do I delete an array element? Need help writing a program. Given a one-dimensional array of real numbers, sorted by ascending values of elements. Delete a given number from the array (if it is there ...
by Alexandr_202
asked Sep 20, 2021
1 vote
1 answer
How do you flip a triangle? I don't know how to flip the triangle (upside down, left to right, etc.). Triangle code: #include < stdio.h >int main(){ for(int i=0; i<6;i++){ fo ...
by FlapsBat
asked Sep 20, 2021
1 vote
1 answer
How to view processes from a C/C++ program? Good evening all! I need to make a simple program (daemon) which will turn off meinkraft (and not give back) after the limit of a day. The difficulty arose in that I do ...
by famousman204
asked Sep 19, 2021
1 vote
1 answer
Isn't that the function that returns the structure? a couple of months ago I studied C from a book and took notes into a file, I forgot what island create(char name) was typedef struct island { char name; char open ...
by jotrib
asked Apr 4, 2021
1 vote
3 answers
What does the space after the * in C do? example int main (int argc, char argv) is it also a pointer or something else? and what is the trick if it is a pointer? ...
by jotrib
asked Apr 3, 2021
1 vote
1 answer
A C problem about coordinates and point and area? I apologize right away if I'm breaking any of the rules of the hub community. Please delete the post if this is the case. There is a task: In the plane there is an are ...
by didrux
asked Apr 3, 2021