All Questions
43 questions
1
vote
0
answers
141
views
Autogenerated code and makefile compile error - No supported target architecture
I'm programming on MS Windows, which is new to me. I've got some C code, makefile, and compile .bat script all autogenerated by Matlab's Simulink package on a Windows Server x64 architecture machine. ...
-1
votes
2
answers
687
views
Check if a number is a perfect square in C
Task:
In an array of N elements (N < 20) of the unsigned long long type
find the maximal full square and print its index (starting from zero).
If there are no full squares, print -1.
If there is ...
-2
votes
1
answer
398
views
VS Code versus cs50.dev
I was write this code in Visual Studio and it's work okey. Everything is fine.
I was start to learn C in cs50.dev. Sometimes i write in cs50.dev. Because it's easy to take input from user. But a ...
1
vote
1
answer
930
views
Why doesn't Visual Studio's scanf_s() function take string inputs?
I use Visual Studio 2022, which marks scanf() function as unsafe and deprecates it. It recommends me to use scanf_s() instead.
So yesterday my teacher was teaching us strings in C and showed us a ...
1
vote
1
answer
89
views
Visual studio 2022 doesn't complie because of this
In visual studio 2022 I can't compile this little program and on Clion, visual studio code and others it compiles.
I don't know if it could be a problem of the clang compiler or some configuration of ...
0
votes
3
answers
885
views
Expression must have a constant value problem
I used C in Visual Studio to make a code for a user to input size of array.
The code does not work in Visual Studio and gives errors.
But on a site like replit it works.
I don't understand what to do ...
0
votes
2
answers
393
views
Error compiling in C [ error: expected ‘=’, ‘,’, ‘;’ ... ]
When I want to compile the Raci.c file by executing gcc Raci.c, I get the following error :
Raci.c:32:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘WinMain’ 32 | int APIENTRY ...
0
votes
0
answers
22
views
I'm trying to compile C/C++ code in VS Code using mingw installed via visual studio 2019 [duplicate]
i have already installed compiler MINGW for c++/c files.. I've set up the json files like the MS website suggests,
here is my json file
{
"configurations": [
{
"...
-3
votes
1
answer
56
views
Why my code is causing the segmentation fault?
I tried to run this program in Visual stdio and used WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB
as input. After running it, it's showing Segmentation fault (core dumped).
How to solve this?
#...
0
votes
2
answers
4k
views
VisualStudio - Fatal error LNK1168: cannot open myfile.exe for writing
Sometime, while I try to compile my project, VisualStudio show me this error:
1>LINK : fatal error LNK1168: cannot open C:\Path\myfile.exe for writing
and It not allowes me to compile the project....
0
votes
2
answers
401
views
Visual Studio 2019 getting error C2440 with typedef data type
I'm getting that problem and don't know how to solve it:
That error:
error C2440: '=': cannot convert from 'void *' to 'node_t'
Code is:
node_t* arr = malloc(sizeof(node_t) * temp3);
for (int i = ...
0
votes
0
answers
26
views
unresolved external symbol "class std::basic_string" - Getting unresolved external symbol when debugging with Visual Studio 2019 [duplicate]
A C++ newbie here so please be kind.
I have console application I am creating Visual Studio. I have set the include directory settings to look for the .h files in the appropriate location. Here is ...
2
votes
3
answers
393
views
Trying to understand the problems in my code
I'm trying to do a function that does the following:
• Receives 3 integers from the user: size1, size2, size3.
• Creates a size1 * size2 matrix and a size2 * size3 matrix.
• Multiplies the 2 ...
0
votes
0
answers
200
views
Why can Visual Studio 2017 Developer Command Promt only open "stdio.h" in Administrator mode?
I am trying to do simulation using Delmia. This requires a functioning C compiler. When i test my C compiler in Delmia, which tries to compile a very simple source file that includes stdio.h, I get ...
0
votes
1
answer
61
views
Visual studio the following code is built without any error?
I have to link the video related, but I will also add the code below.
How does this code builds without any error?
#define INTEGER Cherno
INTEGER Multiply(int a, int b){
INTEGER result = a * b;
...