Fortunatus🐾 🌱SEED
Roko
Malikzada Ahsan
Write a C++ program to input an array from a user of 15 indexes & a series of plus one (+1) in every next index.
Maxim
Write a C++ program to input an array from a user of 15 indexes & a series of plus one (+1) in every next index.
This group is to help you on specific issues you have on YOUR code, so you have to show the code you wrote and explain where and why you are stuck... as simple as that
ANKUR
Okk
Never Spam Bot
Malikzada Ahsan is now approved by the group admin and can send messages without any restrictions I'm learning See spam? Quote the spam message in the group and reply with /spam
G.
Data structure notes
Blue
Hey guys, which udemy course is best for learning multithreading? Also can someone provide me any real time cpp projects on git or their code bases where we can learn some real cpp being used ? Thanks. It can help a lot.
MᏫᎻᎯᎷᎷᎬᎠ
I really find zig approach of having a language level build system is very attractive to have To have a build system that just uses C++ to build C++ projects Has there any attempts to do such things Are there any cons to it?
MᏫᎻᎯᎷᎷᎬᎠ
I really find zig approach of having a language level build system is very attractive to have To have a build system that just uses C++ to build C++ projects Has there any attempts to do such things Are there any cons to it?
Something like this would be cool thing #include <cppbuild> int main(){ Builder b; Target target{.name = "target_name", .target_type = Target::executable,}; target.add_sources({"main.cpp", "source1.cpp"}); target.flags({"-std=c++23"}); target.link_library(....); b.install_target(target); }
MᏫᎻᎯᎷᎷᎬᎠ
Something like this will open possibilities like adding threads to builds(Thus increasing the build time) and make it more approachable since you won't be learning an extra language beside C++
Ludovic 'Archivist'
make
make has notoriously lousy dependency graph building
Marce
make has notoriously lousy dependency graph building
Have you got any related info please, maybe a video or text? Thanks
Ludovic 'Archivist'
Have you got any related info please, maybe a video or text? Thanks
I used Make for 12 years, both GNU Make, BSD Make, and Plan9 mk
Ludovic 'Archivist'
You either need to build your dependency graph of headers by hands like a caveman, or hope and pray your compiler can generate it to be ingested into make without it being generated too redundantly
Ludovic 'Archivist'
Which it always is, let's face it
Ludovic 'Archivist'
So in the eng, most makefile end up equivalent to gcc src/*.c -Iinclude -o a.out with the hopes and prayers that you didn't need an actual incremental build for dev, or like lua's, crafted 15 years ago and rigorously maintained to have a decent dependency graph over the used headers
Ludovic 'Archivist'
Or you debug for 9 hours because the incremental build was not rebuilding after a header change and you did not make -B
MᏫᎻᎯᎷᎷᎬᎠ
So basically something like Tsoding's Nob
Just checked it It's in C Aren't there any C++ ones?
MᏫᎻᎯᎷᎷᎬᎠ
Or at least is this even a good idea?
MᏫᎻᎯᎷᎷᎬᎠ
Like it seems so obvious Why not so a lot of people thought about this if it's good one
Rose
User Shyam Singh has 1/2 warnings; be careful! Reason: ad
Ludovic 'Archivist'
Or at least is this even a good idea?
It has one main benefit: you can always build provided that a C++ compiler is available, and you do not need anything else
Chat Boss
MCA Raaj Pradhan sent a code, it has been re-uploaded as a quote #include <stdio.h> #include <conio.h> void main() { int sum(int,int); int sub(int,int); int mul(int,int); int div(int,int); int rem(int,int); int a,b,p,q,r,s,t; clrscr(); printf("enter the value for a and b="); scanf("%d%d",&a,&b); p=sum(a,b); printf("the result for sum=%d\n",p); q=sub(a,b); printf("the result for sub=%d\n",q); r=mul(a,b); printf("the result for mul=%d\n",r); s=div(a,b); printf("the result for div=%d\n",s); t=rem(a,b); printf("the result for rem=%d\n",t); getch(); } { int sum(int a,int b); { int c; c=a+b; return(c); } int sub(int a,int b); { int d; d=a-b; return(d); } int mul(int a,int b); { int e; e=a*b; return(e); } int div(int a,int b); { int f; f=a/b; return(f); } int rem(int a,int b); { int g; g=a%b; return(g); } Anyone please Solve the error
klimi
MCA Raaj you have function definitions in the void main() function
Rose
That's 2/2 warnings; Shyam Singh is banned! Reasons: 1: ad 2: ad
Rose
Reported to admins.​​​​​​​​​​
Ludovic 'Archivist'
Wonder if there is/was a proposal about this
Not currently, however, keep in mind that CMake is written in C++ (it just has a lot of dependencies)
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
You mean like now you don't need to worry about race conditions only in your app but as a bonus in a build system too?
This shouldn't be a usual thing to have But anyway normally you wouldn't need to worry about it since your host OS(the one you are developing the app with) will normally clean the memory anyway when your program exits
MᏫᎻᎯᎷᎷᎬᎠ
Memory leaks are more of concern in the production platforms
dianddddddddd
how to generate compile_commands.json when use msvc
dianddddddddd
yes
klimi
have you tried this? https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html
dianddddddddd
so, it could not generate compile_commands.json by msvc
dianddddddddd
there is no way ?
mito
msvc is not a build system afaik.
† n06h
Hear me out guys
Noob Trader
Noob Trader
What we can do with c language
Noob Trader
Anyone?
harmony5 🇺🇳 ⌤
I really find zig approach of having a language level build system is very attractive to have To have a build system that just uses C++ to build C++ projects Has there any attempts to do such things Are there any cons to it?
Python packages used to be configured/built/installed with setup.py which was basically what you describe, but they moved to a more declarative config format with pyproject.toml which is the preferred way to configure packages/projects now. You can read the pep that introduced it to see their rationale.
klimi
Anyone?
what answer are you looking for? "everything"?
𝚁𝚒𝚝𝚎𝚜𝚑𝚝𝚑𝚎𝚋𝚎𝚊𝚜𝚝𝚋𝚘𝚢 O⁠_⁠o
i am getting this error in visual code while running c++ code how to fix it i watched many videos in youtube but i can't fix it anyone have idea how to fix it help me if you know how to fix it. [Running] cd "e:\LEARN C++\" && g++ learning cpp ++\learning cpp g++: error: learning: No such file or directory g++: error: cpp: No such file or directory -o e:\LEARN C++\learning cpp && g++: error: C++\learning: No such file or directory g++: error: cpp: No such file or directory g++: fatal error: no input files compilation terminated .1 [Done] exited with code=l in 0.072 seconds
𝚁𝚒𝚝𝚎𝚜𝚑𝚝𝚑𝚎𝚋𝚎𝚊𝚜𝚝𝚋𝚘𝚢 O⁠_⁠o
𝚁𝚒𝚝𝚎𝚜𝚑𝚝𝚑𝚎𝚋𝚎𝚊𝚜𝚝𝚋𝚘𝚢 O⁠_⁠o
klimi
how to fix guys help me
what are your files you want to compile?
𝚁𝚒𝚝𝚎𝚜𝚑𝚝𝚑𝚎𝚋𝚎𝚊𝚜𝚝𝚋𝚘𝚢 O⁠_⁠o
the command looks wrong do you really have files learning then cpp etc.?
i am bigginner and i dont know what i am doing wrong here it watch many youtube video but i cannot fix it
𝚁𝚒𝚝𝚎𝚜𝚑𝚝𝚑𝚎𝚋𝚎𝚊𝚜𝚝𝚋𝚘𝚢 O⁠_⁠o
𝚁𝚒𝚝𝚎𝚜𝚑𝚝𝚑𝚎𝚋𝚎𝚊𝚜𝚝𝚋𝚘𝚢 O⁠_⁠o
#include <bits/stdc++.h> int main() { std::cout<<"hello world"; return 0; }
klimi
i am bigginner and i dont know what i am doing wrong here it watch many youtube video but i cannot fix it
alright. it seems you have g++ installed you just put wrong filename probably
𝚁𝚒𝚝𝚎𝚜𝚑𝚝𝚑𝚎𝚋𝚎𝚊𝚜𝚝𝚋𝚘𝚢 O⁠_⁠o
Fire
Fire
You can use Visual Studio
Fire
Command line gonna be hard for you
𝚁𝚒𝚝𝚎𝚜𝚑𝚝𝚑𝚎𝚋𝚎𝚊𝚜𝚝𝚋𝚘𝚢 O⁠_⁠o
i am using visual studio insider and i got the same error in visual studio code
𝚁𝚒𝚝𝚎𝚜𝚑𝚝𝚑𝚎𝚋𝚎𝚊𝚜𝚝𝚋𝚘𝚢 O⁠_⁠o
Just use an IDE
what is ide and how can i use it
Fire
Visual Studio and visual studio code are different
klimi
i am using visual studio insider and i got the same error in visual studio code
how did you create the project? The output you posted is from what?
𝚁𝚒𝚝𝚎𝚜𝚑𝚝𝚑𝚎𝚋𝚎𝚊𝚜𝚝𝚋𝚘𝚢 O⁠_⁠o
Rose
User Rohit kushwaha has 1/2 warnings; be careful! Reason: ad
Yorhane
Good afternoon guys, please I search topics studying c/c++
Rose
Good afternoon guys, please I search topics studying c/c++
Please check out this channel - @Resources for information on learning sources for C and C++ (books and videos) and Frequently Asked Questions.
Rose
Another one bites the dust...! Banned Hide IP 👁️⃤𓆩🪐𓆪 - Aim Victim - Crack Encrypt - 💀 Kill Firewall. Reason: - 10. Avoid usernames that affects chat readability. - 1. Only English language is allowed. If you don't speak English, then this group is not for you. Please look elsewh
Rose
User Original job👉 has 1/2 warnings; be careful! Reason: spam / hi