Ishank
Can anyone help me to set up virtual studio code 😁
Nomid Íkorni-Sciurus
Nomid Íkorni-Sciurus
so what should i do ?
read the official documentation
Nomid Íkorni-Sciurus
Can anyone help me to set up virtual studio code 😁
question 1) did you read the vscode official documentation for setting it up for C/C++?
Anonymous
what was the error?
threre was no error. the compiler was not installed at all🤦‍♂️
Nomid Íkorni-Sciurus
I would try reinstaaling the compiler suite
Nomid Íkorni-Sciurus
Yes ..
question 2) which part went wrong?
Nomid Íkorni-Sciurus
do you mean me?
no, I meant Ishank
Ishank
question 2) which part went wrong?
Code wasn't running
Roshan
Code wasn't running
Make sure all the required components were installed
Anonymous
no, I meant Ishank
can you tell me how should i install the c++ compiler on VS code?
olli
can you tell me how should i install the c++ compiler on VS code?
1. Download and Install Visual Studio Code - Go to code.visualstudio.com and download Visual Studio Code - Install and at the 'additional tasks' section make sure "Open With Code" and "Add to Path" are selected 2. Download and Install a compiler You can either use MSVC that comes with Visual Studio (not VSCode) or use GCC as part of a mingw distrubion, I recommend using nuwen's distro as it is small and fairly recent. - Go to the MinGW Distro page and download the self-extracting archive [1] - Select a target directory to install it to, (e.g. C:\) - Add the bin directory to your environment path (the bin directory is your target directory + MinGW\bin, so in this case it would be C:\MinGW\bin) - You should be able to open a command prompt and verify your compiler is found, e.g. by entering gcc --version 3. Setup Visual Studio Code - Open VSCode and head over to the extension menu (CTRL + SHIFT + X) on the left hand side, search for the C/C++ extension by Microsoft and install it and restart Visual Studio Code afterwards. 4. Getting started - Create a folder for your project, right-click and "Open with Code". Whenever you opened a workspace the status bar at the bottom will be blue. Otherwise it will be purple. - Create a file and write your code. - On the left hand side, select the "Run" option (CTRL + SHIFT + D) and click "Run and Debug", select "C++ (GDB/LLDB)" and g++ as the compiler. - This will create the default launch configuration. Pressing "F5" will build and start your currently focused file. - At this point IntelliSense should be working and you should be able to set breakpoints and step through your code.
Anonymous
beluga_hz
No
"No" is wrong. Instead say "In my opinion there are better IDEs, like ...". It's called politeness.
Anonymous
1. Download and Install Visual Studio Code - Go to code.visualstudio.com and download Visual Studio Code - Install and at the 'additional tasks' section make sure "Open With Code" and "Add to Path" are selected 2. Download and Install a compiler You can either use MSVC that comes with Visual Studio (not VSCode) or use GCC as part of a mingw distrubion, I recommend using nuwen's distro as it is small and fairly recent. - Go to the MinGW Distro page and download the self-extracting archive [1] - Select a target directory to install it to, (e.g. C:\) - Add the bin directory to your environment path (the bin directory is your target directory + MinGW\bin, so in this case it would be C:\MinGW\bin) - You should be able to open a command prompt and verify your compiler is found, e.g. by entering gcc --version 3. Setup Visual Studio Code - Open VSCode and head over to the extension menu (CTRL + SHIFT + X) on the left hand side, search for the C/C++ extension by Microsoft and install it and restart Visual Studio Code afterwards. 4. Getting started - Create a folder for your project, right-click and "Open with Code". Whenever you opened a workspace the status bar at the bottom will be blue. Otherwise it will be purple. - Create a file and write your code. - On the left hand side, select the "Run" option (CTRL + SHIFT + D) and click "Run and Debug", select "C++ (GDB/LLDB)" and g++ as the compiler. - This will create the default launch configuration. Pressing "F5" will build and start your currently focused file. - At this point IntelliSense should be working and you should be able to set breakpoints and step through your code.
/save cpp-vscode
mahdi13
/get
Anonymous
1. Download and Install Visual Studio Code - Go to code.visualstudio.com and download Visual Studio Code - Install and at the 'additional tasks' section make sure "Open With Code" and "Add to Path" are selected 2. Download and Install a compiler You can either use MSVC that comes with Visual Studio (not VSCode) or use GCC as part of a mingw distrubion, I recommend using nuwen's distro as it is small and fairly recent. - Go to the MinGW Distro page and download the self-extracting archive [1] - Select a target directory to install it to, (e.g. C:\) - Add the bin directory to your environment path (the bin directory is your target directory + MinGW\bin, so in this case it would be C:\MinGW\bin) - You should be able to open a command prompt and verify your compiler is found, e.g. by entering gcc --version 3. Setup Visual Studio Code - Open VSCode and head over to the extension menu (CTRL + SHIFT + X) on the left hand side, search for the C/C++ extension by Microsoft and install it and restart Visual Studio Code afterwards. 4. Getting started - Create a folder for your project, right-click and "Open with Code". Whenever you opened a workspace the status bar at the bottom will be blue. Otherwise it will be purple. - Create a file and write your code. - On the left hand side, select the "Run" option (CTRL + SHIFT + D) and click "Run and Debug", select "C++ (GDB/LLDB)" and g++ as the compiler. - This will create the default launch configuration. Pressing "F5" will build and start your currently focused file. - At this point IntelliSense should be working and you should be able to set breakpoints and step through your code.
thanke you very much bro🙏
Артём
Recommend C++ development tools (IDEs) for component-oriented programming, please. I need to develop user interfaces, but found no simple to start tools, unlike on C#.
Anonymous
ViSuAl StUdIo Is NoT aN iDe
Anonymous
Recommend C++ development tools (IDEs) for component-oriented programming, please. I need to develop user interfaces, but found no simple to start tools, unlike on C#.
Qt Creator if you want use C++ witn QT gnome-builder if you want use C with glib and gtk You can create user interfaces in both(in builder using with glade), but the first is crossplatform, and the second run's only in *nix like systems. upd: i accedentally also write about C when you asked for C++, sorry
Anonymous
ViSuAl StUdIo Is NoT aN iDe
It actually is, but visual studio code is not, it's an editor, and if it would be mentioned it will be on crossplatform section
Anonymous
It'S nOt
Anonymous
jk, Clion it's THE SHIT
Anonymous
best IDE ever
Anonymous
Vim > all
Anonymous
the virgin vim vs the chad writing your code on toilet paper
Anonymous
Vim > all
That’s an editor again, you can ask mods to add note about editors, but it will become to large sometime if everyone would like it to add their favorite fancy text editor
Swapnil
gys how to access variables of dericed class from base class ?
Swapnil
wait ill show my code
Swapnil
im new to c++
Swapnil
#include <iostream> #include <string> using namespace std; class Manager { public: int Id; char cName; }; class Product: public Manager { public: int pId[10]; string pName[10]; float price[10]; void add_product() { for(int i = 0; i < 3; i++) { cout << "Type product Name :"; cin >> pName[i]; cout << "Type product id "; cin >> pId[i]; cout << "Type product price "; cin >> price[i]; } } }; class Customer: public Product { public: int cId[10]; string cName[10]; void add_customer() { for(int i = 0; i < 3; i++) { cout << "Type customer Name :"; cin >> cName[i]; cout << "Type customer id "; cin >> cId[i]; } } void viewCustomer() { for (int i = 0; i < 3; i++) { cout << "Your customer Name is: " << cName[i] << "\n"; } } }; class Cart: public Customer { int cartId; }; int main() { int ch; Product myObj; Customer myCustomer; Manager myManager; while(1){ cout<<"\n \t\t\t=========================\n"; cout<<"\n\t\t\tWELCOME TO UCB CLOTHING STORE \n"; cout<<"\n \t\t\t=========================\n\n"; cout<<"\n \t\t\t* * * * * * * * * * * * "; cout<<"\n\t\t\t 1.add product"; cout<<"\n\t\t\t 2.Customer details"; cout<<"\n\t\t\t 3. EXIT"; cout<<"\n\t\t\t* * * * * * * * * * * *\n"; cout<<"\n\t\t\t Enter Your choice: "; cin>>ch; switch(ch){ case 1: myObj.add_product (); break; case 2: myCustomer.add_customer(); break; case 3: myCustomer.viewCustomer(); break; case 4: exit(0); break; default: cout<<"Enter valid choice\n"; break; } } return 0; }
Swapnil
plzz help me gys
Roshan
Variables from base class can be accessed in derived class
Swapnil
i want to access derived class veriables from base
Swapnil
is it possible ?
Roshan
is it possible ?
What are the two classes?
Swapnil
manager , product customer are classis
Swapnil
i want to modify product from manager
Roshan
i want to modify product from manager
Why are there so many classes? You can even make methods from them.
Swapnil
tr told to
Swapnil
make so manyt classis
Swapnil
basicaly my assignment is i have to make a program ysing 4 classis and 3 functions using inheratance
Manikandaprabu
Any body please send the program for file creation program in c programming
Swapnil
and my topic is clothing store
Swapnil
#include <iostream> #include <string> using namespace std; class Manager { public: int Id; char cName; }; class Product: public Manager { public: int pId[10]; string pName[10]; float price[10]; void add_product() { for(int i = 0; i < 3; i++) { cout << "Type product Name :"; cin >> pName[i]; cout << "Type product id "; cin >> pId[i]; cout << "Type product price "; cin >> price[i]; } } }; class Customer: public Product { public: int cId[10]; string cName[10]; void add_customer() { for(int i = 0; i < 3; i++) { cout << "Type customer Name :"; cin >> cName[i]; cout << "Type customer id "; cin >> cId[i]; } } void viewCustomer() { for (int i = 0; i < 3; i++) { cout << "Your customer Name is: " << cName[i] << "\n"; } } }; class Cart: public Customer { int cartId; }; int main() { int ch; Product myObj; Customer myCustomer; Manager myManager; while(1){ cout<<"\n \t\t\t=========================\n"; cout<<"\n\t\t\tWELCOME TO UCB CLOTHING STORE \n"; cout<<"\n \t\t\t=========================\n\n"; cout<<"\n \t\t\t* * * * * * * * * * * * "; cout<<"\n\t\t\t 1.add product"; cout<<"\n\t\t\t 2.Customer details"; cout<<"\n\t\t\t 3. EXIT"; cout<<"\n\t\t\t* * * * * * * * * * * *\n"; cout<<"\n\t\t\t Enter Your choice: "; cin>>ch; switch(ch){ case 1: myObj.add_product (); break; case 2: myCustomer.add_customer(); break; case 3: myCustomer.viewCustomer(); break; case 4: exit(0); break; default: cout<<"Enter valid choice\n"; break; } } return 0; }
i think best way is to shift manager class down what you think ?
Roshan
i want to modify product from manager
You can't in my opinion
olli
plzz help me gys
I don't think that makes a lot of sense.. so a Product is Manager? And a Customer is a Product and hence a Manager? And Cart is all of the above?
Anonymous
/warn @Valour101 PMing
.
Can you help me for an esercize ?
olli
Can you help me for an esercize ?
We won't do you homework. What have you done so far?
.
I should do a home exercise just started this topic
Yazidi
#include <iostream> #include <string> using namespace std; void info(string[], double[], int&); int main () { int num; string student[num]; double score[num]; info(student, score, num); return 0; } // to do unlimited numbers of student's array.. void info (string student[], double score[], int& num) { cout << "How many students you have? "; cin >> num; cout << endl; for (int i=0; i<num; i++) { int j; cout << "Enter studen's name (" << j << "): "; cin >> student[i]; cout << "Enter student's score (" << j << "): "; cin >> score[i]; cout << endl; j++; } }
Yazidi
I want the user to enter the size of the arrays
Roshan
You should put the cin>>num; in main after int num;
Yazidi
but the "j" variable doesn't work well ! it should be increased every time !
Yazidi
but it doesn't !
Yazidi
#include <iostream> #include <string> using namespace std; void info(string[], double[], int&); int main () { int num; cout << "How many students you have? "; cin >> num; cout << endl; string student[num]; double score[num]; info(student, score, num); return 0; } // to do unlimited numbers of student's array.. void info (string student[], double score[], int& num) { for (int i=0; i<num; i++) { int j=1; cout << "Enter studen's name (" << j << "): "; cin >> student[i]; cout << "Enter student's score (" << j << "): "; cin >> score[i]; j++; cout << endl; } }
Yazidi
here is the edited code after
Yazidi
alright😂😂😂👍🏽
Yazidi
thnx
Roshan
alright😂😂😂👍🏽
Remove j and use i instead. There is no need of j