olli
how open c_cpp_properties.json to edit it?
it should exist inside .vscode\c_cpp_properties.json within your project workspace. If it does not, create it
christian
Can i get the explanation from my questions
You had written if(num1 = = num2) It should be if(num1 == num2)
mahdi13
it should exist inside .vscode\c_cpp_properties.json within your project workspace. If it does not, create it
ok i create it now paste : ??? "configurations": [ { "name": "Win32", "includePath": [ "additional/paths", "${default}" ], "defines": [ "${default}" ], "macFrameworkPath": [ "${default}", "additional/paths" ], "forcedInclude": [ "${default}", "additional/paths" ], "compileCommands": "${default}", "browse": { "limitSymbolsToIncludedHeaders": true, "databaseFilename": "${default}", "path": [ "${default}", "additional/paths" ] }, "intelliSenseMode": "${default}", "cStandard": "${default}", "cppStandard": "${default}", "compilerPath": "${default}" } ],
christian
olli
it is hard compiling in vs code
no, it's easy if you already have a build system setup for your project. And even easier if you have a CMake project. Do you have a compiler installed?
christian
mahdi13
Anonymous
olli
prefer cmake - great tooling - great VSCode extension - supports multiple IDEs / build systems
Anonymous
Very fest
olli
it it fast ?
cmake can generate ninja build files which is the fatest build system in my experience.
Anonymous
is it support parallel jobs like make -j 12 ?
olli
is it support parallel jobs like make -j 12 ?
cmake or ninja? you can't really compare cmake to make
Anonymous
cmake I mean .I haven't used it .I like to use it for compiling kernel if it is faster than make with multiple cores .
olli
cmake I mean .I haven't used it .I like to use it for compiling kernel if it is faster than make with multiple cores .
you cannot use cmake as a drop-in replacement, does your project support it? If not one needs to set it up before you can use it.
Anonymous
oh,it wants different Makefile than make ?
olli
https://stackoverflow.com/a/25790020/4416573
Manikandaprabu
Hai.. I want the program for Student rank list in c
Manikandaprabu
Any one send the program for finding the rank of students
Manikandaprabu
Then write it!
Are you have?
Manikandaprabu
Do it yourself
Any one help me.. Tomorrow thats my task
Manikandaprabu
Any body know that idea
Apk
You wrote fun instead of fact
Manikandaprabu
What rules
Apk
What rules
Pinned message
Nils
uberswitch(obj.key()) { case("id"): id = s2i(obj.value()); continue; case("name"): name = obj.value(); continue; } Any idea why this gives me: "unannotated fall-through between switch labels"?
Anonymous
Guys is there any gui support for msys2
Z
/warn
Nils
Why use continue here?
it's a loop
Apk
it's a loop
Try writing continue after all the cases
Roshan
What's it?
beluga_hz
Share the program
Yosef
#include <stdio.h> int main() { int base, exp; long long result = 1; printf("Enter a base number: "); scanf("%d", &base); printf("Enter an exponent: "); scanf("%d", &exp); while (exp != 0) { result *= base; --exp; } printf("Answer = %lld", result); return 0; }
Yosef
could you please change the program a^b for negative b
Yosef
without pow
Yosef
a =base, b = exp
Roshan
could you please change the program a^b for negative b
Flip it over. like for 4^-2, it'll be 1/4^2
Roshan
could you please change the program a^b for negative b
Check if the exp is <0 then divide from 1
beluga_hz
Nope, use pastebin
Yosef
this is ok ?
Roshan
Working fine
Yosef
yes, i checked it
Yosef
but code looks ok?
Yosef
may be
Yosef
to improve it
Anonymous
so the matrix only has n kinds of numbers and are they bounded?
Anonymous
first I would see in every row if a number is repeted more than 2 times consecutively if so when it stops i wanna look upside if it's triangulish
Anonymous
guess that only works if all the triangles are on top shaped
Lava
#include <iostream> using namespace std; int main() { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } int max = 0, check = 0; for (int i = 0; i < n - 1; i++) { int smax = 0, rmax = 0; for (int j = i + 1; j < n; j++) { if (i != j) { if (a[i] == a[j]) { check++; smax = j - i; rmax = n - j + i; if (rmax > smax) smax = rmax; } } } if (smax > max) max = smax; } if (check > 0) cout << max; else cout << n; return 0; }
Lava
Question is to find rotation with maximum hamming distance in an Array. Any way I could improve my code's time complexity ?
Anonymous
Hello guys. This program of my friend may help you in your codes in C: https://github.com/Theldus/sourcery basically, it's a spell checker that analyzes all strings, comments, functions and variables and informs you if there's a possible error with them. It is very fast, it managed to analyze the entire linux src in 1.2s. It's very recommended to medium-larger projects in C.
Rahul
Hey guys! Can you tell me how does debugging in Vscode works? 😓 I am on mac os
Epsilon
Hello everyone, please help
Epsilon
A program to take a snapshot of first nKBytes of RAM.
Anonymous
Please help me with this
What's the problem?
Anonymous
Do you want us to write the program?
Epsilon
Do you want us to write the program?
Yes sir please if you can
Anonymous
Yes sir please if you can
/ban the only thing I can is to give ban to the person that doesn't follow rules, bye
Vero
Hi, I'm Veronika from Ukraine, learning C for half a year. Now I have complicated task: to make structure1 with an array of structures2 and use such structure1 in functions, make stack and queue. I've Googled and Youtubed, but need some help. Pls, write me
✙Олег!?
У одновімірному масиві, що складається з N цілих елементів, обчісліті: - добуток елементів масиву з парними номерами. що нетак з моїм кодом
✙Олег!?
In a one-dimensional array consisting of N integer elements, calculate: - the product of the elements of the array with even numbers. what's wrong with my code #include <iostream> using namespace std; void main() { const int N = 5; int arr[5]{ 32,7,2,18,88 }; int dob=0; for (int i = 0; i < 5; i++) { if ((i % 2) == 0); dob = dob * N[i]; cout << dob << endl; } }