Nana
#include <iostream> #include <vector> #include <ctime> #include <cstdlib> #include <algorithm> using namespace std; void intro(); int main() { intro(); vector<string>names; unsigned seed = time(0); srand(seed); int min = 1, max = 10, num, size = (rand() % (max - min+1))+min; string person_name, search_name; for(int count = 0; count < size; count++) { num = (rand() % (max - min+1))+min; if(num == 1) person_name = "Kofi"; else if(num == 2) person_name = "Ama"; else if(num == 3) person_name = "Abraham"; else if(num == 4) person_name = "Papa"; else if(num == 5) person_name = "Ernest"; else if(num == 6) person_name = "Ibra"; else if(num == 7) person_name = "Opoku"; else if(num == 8) person_name = "Augstine"; else if(num == 9) person_name = "Nana"; else person_name = "Ann"; names.push_back(person_name); } sort(names.begin(), names.end()); cout<<"Enter the name you're searching for: "; cin>>search_name; cout<<endl; if(binary_search(names.begin(), names.end(), search_name)) cout<<"Name is found in the lists\n"; else cout<<"Name is not found in the list\n"; cout<<endl; cout<<"Here are the names\n"; cout<<"------------------------\n"; cout<<endl; cout<<"INDEX\t\tNAMES\n"; cout<<"------------------------------\n"; for(int count = 0; count < names.size(); count++) { cout<<count + 1<<"\t\t"<<names[count]<<endl; } return 0; } void intro() { cout<<endl; cout<<"\t\tThis is a searchable vector program in C++\n"; cout<<"\t\t----------------------------------------------\n"; cout<<endl; }
How can I convert this into .exe file?
Nana
Compile O-0
What does it mean bro?
\Device\NUL
What does it mean bro?
Did you know actually what is compiled lang ?
Nana
yh
\Device\NUL
Then why you ask how to convert code into executable ?
Nana
I tried to open it from the debug folder but it can't be opened
Nana
Nothing of that sort is found
\Device\NUL
Nothing of that sort is found
It's permission problem
Nana
I run it as administrator but still does not work
Nana
It's permission problem
Can I send u a screenshot in your dm?
\Device\NUL
Also, your IDE or text editor
Nana
codeBlocks
\Device\NUL
codeBlocks
Have you installed compiler ?
Nana
I use the one which came with the codeBlocks
\Device\NUL
I use the one which came with the codeBlocks
Did compile & run button give any message ?
\Device\NUL
no
Go to settings and check if the compiler is already setted
Nana
ok
mito
I use the one which came with the codeBlocks
Use the build option if it's available.
mito
I never used codeblocks, I'm just assuming there's this option.
mito
It's an IDE.
mito
This one's an editor.
Ludovic 'Archivist'
Clion is very good
Ludovic 'Archivist'
It is a little too good
Anonymous
Clion is not open source
Anonymous
Need license for run it
Ludovic 'Archivist'
Well I just pay and I am fine with it
Anonymous
New account every month
Anonymous
How it could be good more than vs code
Anonymous
I did not get
Ludovic 'Archivist'
20€ or something
Anonymous
Oohh
Ludovic 'Archivist'
for individuals it is like 10€
Anonymous
10 for a month?
Ludovic 'Archivist'
J
I did not get
You can get jetbrains license along with GitHub student program. (But you have to give your school's/uni's email)
Gilded
how about xcode
Nana
pls someone should help me with this project
Nana
Consider the system description below: DCSIT instructors can teach a minimum of 4 courses a semester but as many courses as they can handle. All instructors are salaried employees at the DCSIT and therefore we need to keep track of how much they make each year. An instructor’s monthly salary is determined by the basic monthly salary, allowances, overtime, taxes, and deductions (i.e., basic + allowances + overtime – tax – deductions). Monthly Basic salary: All instructors earn GHS2500. This amount is the same each month irrespective of the number of courses taught in the semester. Monthly Allowances: The breakdown of allowances per instructor type are in the table below Transportation 600 Electricity 100 Rent 500 Total 1200 Overtime: If an instructor teaches more than 4 courses in a semester, they are granted an extra onetime bonus of GHS1,000 for each extra course. This bonus is paid in the last month of the semester (i.e., May and December). Taxes: The table below indicates the different tax bands. This is the same for all instructors. The tax is calculated on the gross income (basic + allowances + overtime - deductions). Chargeable Income (GHS) Rate (%) Tax Payable (GHS) Cumulative Income (GHS) Cumulative Tax (GHS) First 365 0 0 365 0 Next 110 5 5.5 475 5.5 Next 130 10 13 605 18.5 Next 3,000 17.5 525 3,605 543.5 Next 16,395 25 4,098.75 20,000 4,642.25 Exceeding 20,000 30 6,000 Deductions: For simplicity, the only deductions are for SSNIT and sick days. Every instructor is deducted 5.5% of the monthly basic salary for SSNIT. In addition, all employees are entitled to 3 sick days a month (absence form work); any additional sick day results in a deduction of GHS200 from basic pay. The code downloaded from the e-learning platform contains a partial implementation and partial set of tests for the above system. QUIZ 2 Software Engineering (CSC 317) Date: 19th April 2022 Duration: 60 mins Your tasks 1. Create a Java project and copy the source files and test files into your project 2. Create a report document (Word file, txt file, of PDF) 3. Run the included set of tests and document which tests passed or failed 4. For the tests that failed, identify and document the reason for their failure. Do not simply indicate that the expected value was incorrect. 5. For the failing tests, modify the source code to fix the errors till the tests pass. Your deliverables Your final submission should be a zipped file containing the report (for tasks 2-4) and the updated source and test code. The zipped file should be uploaded to the e-learning platform. There would be a 15-minute grace period. Any uploads after that would receive a late penalty
Vertical
You can get jetbrains license along with GitHub student program. (But you have to give your school's/uni's email)
JetBrains also offers open source licensing for open source developers, which can be found at the following link: https://www.jetbrains.com/community/opensource
mito
I'm student, so I get it for free.
Ludovic 'Archivist'
C programming course session I will be giving a comprehensive course on C programming for beginners. The course will teach you the basics of programming in C. It serves as a foundation to then learn system programming and embedded programming in C. The course costs $32.5 per month over 3 months (one day per week, 13 days total) or $97.5 in total. It covers the following: Basics * Functions * Types * Expressions * Pointers * Control-flow * Macros Styles * Procedural programming * OOP Compilers and friends * Unix * Make * GCC and options * Linker and options Courses will be on Saturdays, 7:00AM UTC to 11:00AM UTC and 12:30PM UTC to 03:30PM UTC, starting on May 21rst 2022. https://cloud.nekoit.xyz/apps/forms/YBt5F4gz4RS5Qmbx
Ludovic 'Archivist'
OOP in C?
Indeed, similarly as in the codebases of SDL2 or Tcl
Danya🔥
Indeed, similarly as in the codebases of SDL2 or Tcl
It is just too weird and hacky If you want OOP, it's better to use C++
Ludovic 'Archivist'
It is just too weird and hacky If you want OOP, it's better to use C++
Maybe, but it is also quite common in actual codebases
Ludovic 'Archivist'
it is also at the heart of unix in some way
Your senpai : )
here anybody know html? i need help
Ludovic 'Archivist'
Unfortunately
I don't know if it is unfortunate as there are very few ways to handle complex data structures in C. It allows to remove complex function dependencies.
Ludovic 'Archivist'
If you think a book and a teacher are the same you are free to buy or use a free book. In my experience books do not really teach you how to maintain a codebase and handle ecosystems
Ludovic 'Archivist'
I am not talking about IDEs, I am talking about software design and programmable interface design
Ludovic 'Archivist'
Frameworks are an example of programmable interface, so are libraries and so are tools inside a codebase. For example the tcl_string in the tcl codebase have a very complex programmable interface
Danya🔥
Qt is not meant to be used with C
Ludovic 'Archivist'
Qt is not meant to be used with C
You beat me to the point
Danya🔥
I don't know if it is unfortunate as there are very few ways to handle complex data structures in C. It allows to remove complex function dependencies.
My point is that even though there's a lot of complex and very important codebases written in C, I think C++ is more suitable for the large hardcore codebases Imagine Chromium written in C, I wonder if it would be alive at this point
Ludovic 'Archivist'
SDL2, iwnet...
J
Maybe, but it is also quite common in actual codebases
Never heard of "cpp styled" C
Ludovic 'Archivist'
iwnet if a Framework for web application, SDL is a toolkit for 2D only graphical applications
Danya🔥
Say that to Linus Torvalds, I tried. C is usable, but requires more rigorous behaviour
I wouldn't have even try this :D C++ is not really suitable for the kernel, but it could be, at least a subset of it Anyways, I was talking about more high-level codebases like Chromium or LLVM, C for kernel probably is a better option
Ludovic 'Archivist'
it was quite comfy
Ludovic 'Archivist'
and that was C++14, now it would be extra comfy
Danya🔥
it was quite comfy
Did you have C++ wrappers for kernel api?
Danya🔥
What?
Ludovic 'Archivist'
Did you have C++ wrappers for kernel api?
There was no wrapper, the kernel was written by me in C++
Ludovic 'Archivist'
but I do have wrappers when i need to work on linux kmods with C++
Danya🔥
But C++ is used in kernels like Windows NT, Zircon(Fuschia), etc... Right?
AFAIK, it is primarily C (windows) But there is a nice project https://github.com/DymOK93/KTL
Danya🔥
There was no wrapper, the kernel was written by me in C++
Oh then great I meant linux kernel, sorry
Ludovic 'Archivist'
AFAIK, it is primarily C (windows) But there is a nice project https://github.com/DymOK93/KTL
I use this: https://git.nekoit.xyz/Archivist/gplib/ Made by yours truly (needs a good round of maintenance)
Ludovic 'Archivist'
Why not Github?
I like to have my paws in my software and not lose my workpieces like the lead dev of Terraria
Ludovic 'Archivist'
What about self-hosted Gitlab then?
Self hosted gitlab is wrtten in ruby and has terrible performance. I tried it and burned it as soon as it touched the hardware