浩
gotta post new rules
I think it is unreasonable to forbid us to use pastebin in a program language group...What should I do if I want show some large code?
Nomid Íkorni-Sciurus
Nomid Íkorni-Sciurus
I mean there are almost 16.000 users
Nomid Íkorni-Sciurus
imagine if everybody wrote at once.
浩
Michel
Anonymous
Michel
smene
Hi, I have a problem with cmake
smene
CMakeList.txt: https://nekobin.com/jeposomope
Build Traceback: https://nekobin.com/salatigare
Anonymous
Hi guys
Anonymous
A company stores the age and salaries of its employees.Write a program that gives us how many employees who are older than L years get a salaryless than M.Input The frst line of the standard input contains the count of employees (1≤N≤100), theage limit (1≤L≤100) and the salary limit (1≤M≤2000000). The next N lines contain theage (1≤A≤100) and salary (1≤S≤2000000) of an employee each.Output The frst line of the standard output should contain the count of employees who areolder than L and earn more than M.
Example Input 6 40 200000
42 150000
33 100000
25 600000
66 80000
25 200000
42 800000
Output 2
Anonymous
I need your help please 😢🙏
Prometheus
Leovan
Who's know why i need to create a second template to make operator<< friendly?
template <typename T>
class List
{
template <typename Type>
friend std::ostream & operator<<(std::ostream & os, const List <Type> & list);
...
};
template <typename T>
std::ostream & operator<<(std::ostream & os, const List <T> & list)
{
if (!list.is_empty())
{
Node <T> * tmp = list.head;
while (tmp != nullptr)
{
os << tmp->data << " -> ";
tmp = tmp->next;
}
}
return os;
}
Anonymous
Anyone use vs codium?
Anonymous
Thank you
Anonymous
Hello, i am just learning c programming and i am trying to write a program that increases salary at the same percentage for five months while tax remain the same.
\Device\NUL
Anonymous
Guys I need some help, please 😭😢
klimi
Anonymous
Anonymous
Ali
Find the error in the code and explain why int y, *yptr;
*yptr = 10;
yptr = &y;
y = 5;
*yptr = 10;
cout << *yptr;
\Device\NUL
Ali
Ali
\Device\NUL
The compiler should be smart enough to tell you what's the problem
Pavel
\Device\NUL
Ali
where is the error and why? int data;
int*const ptr = &data;
*ptr = 5;
ptr = NULL;
int*const ptr2;
Anonymous
Icefrog2000
https://github.com/Perfare/Il2CppDumper
浩
I bet it is an ad acount.
Пожилой Христос
I can use Win32 lib for cross-platform use?
Anele
Hello everyone
Harleen
Harleen
c++
I have a a json file and I have to read it using nlohmann.
As I read it, I have to also put the keys in the map object that I have created (which in turn have a map object as json can have further keys inside keys).
I have used
ifstream with nlohmann::json
Ifstream MyFilecontent >> nlohmann::json
But i don’t know how to go ahead from here.
Could anyone please help?
Harleen
Nlohmann is a library for json in c++.
Gilded
i cant read books, i only watch lectures, i use my udemy premium account, its enough right?what more in books?
EYE LORD
Anyone wants to discuss some projects ideas with me
Ali
Find the error in the following code and explain why.
int data;
const int* ptr;
ptr = &data;
*ptr = 5;
Gilded
Gilded
i also want to work with
Gilded
Anonymous
printf("The increment is:%f\n", outstanding);
        printf("Increment and Tax over the five years\n");
        multiplier = 1;
        float newtax = 0.25 * (outstanding * grosssalary + grosssalary);
        float newpay = grosssalary + (grosssalary * outstanding);
        float newnet = newpay - newtax;
        float newincrement = outstanding * grosssalary;
       
        for (multiplier = 1; multiplier <= 5; multiplier = multiplier + 1)
        {
            printf("year %d: %f",multiplier, newtax);
            printf(" %f\n", newnet);
        }
        
Anonymous
Please how do i make this program increase pay by 25 percent continously for 5 times will tax is deducted as well
Anonymous
I meant while tax ia deducted as well
Anonymous
Here is the question i am trying to solve: if an employee is giving the same salary increment every year for the next 5 months calculate the per montj net pay after tax deduction of 25%
Anonymous
Show the code
printf("The increment is:%f\n", outstanding);
        printf("Increment and Tax over the five years\n");
        multiplier = 1;
        float newtax = 0.25 * (outstanding * grosssalary + grosssalary);
        float newpay = grosssalary + (grosssalary * outstanding);
        float newnet = newpay - newtax;
        float newincrement = outstanding * grosssalary;
       
        for (multiplier = 1; multiplier <= 5; multiplier = multiplier + 1)
        {
            printf("year %d: %f",multiplier, newtax);
            printf(" %f\n", newnet);
        }
        
Пожилой Христос
\Device\NUL
Thanks
But native binary is better than run it using compability tool
Пожилой Христос
I can throw off the code here for evaluation and criticism, but am I still using SFML?
\Device\NUL
Thanks, what library can i use without rewriting all the code?
I think you can't. I never find someone implementing Windows API to POSIX API. But you can compile POSIX header in Windows with Unix compability layer using Cygwin or MinGW.
some of posix header is unistd.h.
Unix compatibility layers such as Cygwin and MinGW also provide their own versions of unistd.h. In fact, those systems provide it along with the translation libraries that implement its functions in terms of win32 functions.
https://en.wikipedia.org/wiki/Unistd.h
Пожилой Христос
Пожилой Христос
I just started writing this, but I want to hear your opinion and criticism
#include <SFML/Graphics.hpp>
#include <iostream>
using namespace std;
using namespace sf;
#define NumberButton 9
RenderWindow window(VideoMode(800, 600), "Encryption", Style::Close);
struct MyChoice
{
string MyChoice;
};
int main()
{
MyChoice MyChoice;
Texture background;
Sprite BACKGROUND;
background.loadFromFile("texture/background.jpg");
BACKGROUND.setTexture(background);
BACKGROUND.setScale(
window.getSize().x / BACKGROUND.getGlobalBounds().width,
window.getSize().y / BACKGROUND.getGlobalBounds().height);
Image icon;
if (!icon.loadFromFile("texture/icon.png")) return EXIT_FAILURE;
window.setIcon(icon.getSize().x, icon.getSize().y, icon.getPixelsPtr());
window.setVerticalSyncEnabled(true);
string* TEXT = new string[NumberButton]{ "Encryption:", "Decoding:", "Caesar cipher", "Vernam cipher", "Hill cipher", "Vigenère cipher", "Gronsfeld cipher", "Rivest–Shamir–Adleman" };
Text text[NumberButton];
Font font;
if (!font.loadFromFile("font/AnonymousPro-Bold.ttf")) return EXIT_FAILURE;
for (size_t i = 0; i < NumberButton; i++) //set textures and sprites
{
if (i < NumberButton - 1) text[i].setString(TEXT[i]);
text[i].setFont(font);
text[i].setCharacterSize(24);
text[i].setFillColor(Color::Red);
if (i > 1 || i < NumberButton - 1) text[i].setPosition(500, 75 + ((i - 2) * 50));
}
text[0].setPosition(120,75); //Encryption
text[1].setPosition(120,300); //Decoding
MyChoice.MyChoice = "Cipher: " + TEXT[2];
text[NumberButton - 1].setString(MyChoice.MyChoice);
text[NumberButton - 1].setPosition(10, 10);
delete[]TEXT;
TEXT = nullptr;
while (window.isOpen()) //drow sprite
{
Event event;
while (window.pollEvent(event)) {
if (event.type == Event::Closed)
window.close();
}
window.clear();
window.draw(BACKGROUND);
for (size_t i = 0; i < NumberButton; i++)
{
window.draw(text[i]);
}
window.display();
}
}
Harleen
Hello,
Can someone help me iterate over a nested json object and mapping each key to a map using nlohmann’s library?
😊
Any one here those very good knowledge c
😊
Solved any problem
Pavel
Пожилой Христос
this is the window for my text encryption program
Artur
Thanks
Why not use latest c++ 20 standard and where you need to go cross platform either use 3rd party libraries like Gtkmm for gui ?
Пожилой Христос
Anonymous
oof
Anonymous
Пожилой Христос
Anonymous
tho probably not the WIn32 API explicitly but most all of .NET except the windows Win32 API (eg HANDLE, PVOID, etc are all part of Win32 API) are portable
Пожилой Христос
Anonymous
Which training should I do to be able to programming a DPI for 100gbps