Is it optimal to create classes that inherit from std classes?

I have a small program that I've re-written from C that contains functions that accept either DIR* or FILE* to represent directory and file objects.

Now I want to use std::filesystem, but std::filesystem only contains the class directory_entry, which can either be a regular file, block file, directory..etc

I mean yeah sure, I can do checks before feeding them to functions and such stuff, but I want to make it clear and readable that this function explicitly accepts this file type.

I thought about maybe aliasing names, but still that doesn't affect the functionality, so I thought about creating classes that inherit from the std::filesystem::directory_entry class.

What do you think? and is there a better thing to do?

Thanks in advance.

reddit.com
u/Ultimate_Sigma_Boy67 — 4 days ago

Up to which point should I learn assembly?

This might not be a C++ specific question, but I've read on this subreddit that knowing assembly and knowing what the code roughly compiles to is really recommended to have a better grasp of C++(and C) and might even allow me to optimize my code further.

So up to which point? and is there a specific recommended architecture?

Thanks in advance.

reddit.com
u/Ultimate_Sigma_Boy67 — 7 days ago
▲ 27 r/igcse

FOR ANYONE ASKING CAN I STUDY SUBJECT X IN Y DAYS AND GET A Z GRADE!

The rule is, you can study ANY subject in 3 months only, AND get an A*/9.

Finish the syllabus in a month, it's extremely recommended to have tuition if you're on vacation, for example.

3 months is enough to study around 3-4 subjects and get an A* comfortably, which can vary ofc with how hard the subjects you're taking are.

+ ALSO make sure that you've covered at least half of the syllabi at school if you're taking more than 2 subjects, so you can save time.

So 1) Finish the syllabus in 1 - 1.5 months, and then grind past papers, you can even re-study the syllabus again.

reddit.com
u/Ultimate_Sigma_Boy67 — 10 days ago

يا جماعة الله يهديكم هسه انا قايلة بيهينه خربنا ام معنى الكلمة زاتو 😭😭😭

u/Ultimate_Sigma_Boy67 — 13 days ago

Guys this has been occuring a lot recently? literally like 2/5 tests get flagged like wtf?? and my PB is actually 138 or smth why am I getting flagged for this?!

u/Ultimate_Sigma_Boy67 — 18 days ago
▲ 3 r/alevel

Can Edexcel IAL Computer Science be studied or does it need tuition?

For instance I studied the majority of IGCSE cs on my own using notes and resources online, and I'm expecting a 9, can the same be done with AS?

Thank you in advance.

reddit.com
u/Ultimate_Sigma_Boy67 — 19 days ago

Can Edexcel IAL Computer Science be studied or does it need tuition?

For instance I studied the majority of IGCSE cs on my own using notes and resources online, and I'm expecting a 9, can the same be done with AS?

Thank you in advance.

reddit.com
u/Ultimate_Sigma_Boy67 — 19 days ago

يا جماعة عندنا معارف في الابيض وقعت في بيتهم مسيرة اتوفى منهم حوالي 6 رجال اترحموا عليهم و حسبي الله و نعم الوكيل

reddit.com
u/Ultimate_Sigma_Boy67 — 25 days ago
▲ 2 r/Olevels+1 crossposts

0625 Physics AMA session, ask me any question.

For context I get around 37-40 on average on past papers.

Ask me and I'll do my best to address your concerns.

reddit.com
u/Ultimate_Sigma_Boy67 — 1 month ago

ايه رايكم في دراسة الهندسة في فرنسا؟

يعني من ناحية تكلفة و معيشة و ان شاء الله استقرار بعد الدراسة و الخ

شكرا

reddit.com
u/Ultimate_Sigma_Boy67 — 1 month ago

يعني شنو رائع و ليه الناس بيستخدموها في بوستاتهم هنا

صاح هي كلمة عنصرية؟ طيب كيف الناس بيستخدموها هنا و الناس بيدوهم ابقوتس زي مثلا في البوست ده والله ما فاهم

https://www.reddit.com/r/KHARTOUM_/comments/1tndmh8/%D9%87%D9%84_%D8%A7%D9%86%D8%AA%D9%88%D8%A7_%D8%B9%D8%A7%D8%B1%D9%81%D9%8A%D9%86_%D8%A7%D9%86%D9%87_%D8%A7%D9%84%D8%B1%D8%A7%D8%A6%D8%B9%D9%8A%D9%86_%D8%AF%D9%8A%D9%84_%D8%A8%D9%82%D9%88%D8%A7_%D9%8A%D9%85%D8%B4%D9%88%D8%A7/

reddit.com
u/Ultimate_Sigma_Boy67 — 1 month ago
▲ 42 r/igcse

0625 PAPER 6 TIPS DUMP

So this is basically my tips n mistakes log that I kept while solving past papers, feel free to read through it. (march 2023 - march 2026)

- While plotting a graph, if the question says you do not have to pass through the origin, don't do it to obtain more accurate graph.

- Don't write units unless asked.

- When measuinrg focal length of a lens, problems that might need to be minded: 1) Interference with light -> room should be darkened 2) unable to get position

of the sharpest image -> move the sheet back and forth till getting the sharpest image.

- Readings such as readings of a stop watch should be copied directly into the given table without any rounding to any significant figures.

- "Start your axes from the origin" doesn't mean the LINE should start from the origina.

- Length/mass graph can't start from origin as length can never be 0.

- To check if n is repreducible in block/light ray experiments, you can try different angles, use optical pins, try to project light on a different side and try

different glass prism of the same material.

- Don't forget precautions in the plan experiemnt question.

- Measuring cylinder is read to obtain volume of a liquid by measuring at RIGHT ANGLE at the surface of water, not the slight extension.

- A precaution while measuring temperature of a liquid in a beaker is to prevent the thermometer touching the beaker.

- There's no zero-error in thermometers.

- Increasing focal distance is bad for converging lense experiments because it would decrease the image size vastly.

- Precautions while measuring pendulum height: 1) Use set square 2) Make sure ruler and pendulum string are parallel 3) Metre rule close to pendulum 4) look

perpendicularly to the ruler.

- In questions where you're asked to list additional values to be used in the experiment, refer back to the previous parts of the question to know the limits in

which the values must be provided.

- Precautions when trying to obtain a clearly focused image on a screen: 1) Carry out experiment in a dark room 2) Move the screen back and forth.

- Explain why the diameter of a ball is measured by fitting it between two blocks and getting the average distance between the blocks: 1) It's difficult to measure

from the centre of the ball and measure the diameter directly 2) [important] May cause parallax error 3) A ball doesn't have clear shapr edges.

- Make sure to read and solve ALL the questions, specially the table headings one.

- To decrease heat loss of a beaker to the surroundings: 1) Cover it with silvery and shiny coating 2) Insulation with wool 3) Add a lid

- When constructing the graph in the planning question, include all measurements that led to the result, for example instead of only including resistence, include

headings fore V and I.

- When asked about the technique in lens diagrams, focus on whether the lens or the screen is being moved.

- Carrying out lens experiments in a dark room is better because the contrast between the image and the rest of the screen is better.

- To make sure a ruler is horizontal, measure height from the ground at 2 different places and make sure they're equal.

- When an electrical instrument shows a constant increase by the same value when repeating an experiment, this means that it hasn't been reset to zero.

- Always in sub-questions of the same question write answers to the same significant figures.

- To ensure that the center a rectangular object is directly over the 50.0 cm mark, edges of the object must be symmetrically and equally to either sides of the

50.0 cm mark.

- If two numbers are equal, do NOT calculate percentage error, just write that they're exactly the same.

- Always show working to questions > 1 mark even if it didn't ask.

- Suggest inaccuracies that might be faced when ray-tracing a mirror reflection: 1) Thickness of mirror 2) Variations on protractor angle 3) Thickness of light ray

4) Difficult to locate the centre of the light ray.

- A resistence can't be negative, so if a resistence is numerically equal to the gradient of a graph which is negative, convert it to positive.

- When measuring an irregular shape that's already hard to measure accurately, and then measure a smaller version of it, the measurements may not be as accurate

because THE EFFECT OF UNCERTAINTIES IS INCREASED.

- To reduce heating effect of resistence wires, the EMF is decreased, not hte current.

- To fix blocking the shadow when taking image measurements, focus the image on a translucent screen and take the measurements from behind.

- Precautions while using balance: avoid zero error / reset the balance - make sure the balance is clean.

- Pendulum is measured till its centre of mass.

- The loops at the beginning and end of a spring are NOT measured since THEY DO NOT EXTEND.

- All readings in a table in a single column must be to the same s.f.

- To take readings accurately while measuring time intervals: one student should be looking at the stopwatch and the other should be recording measurements OR

have the thermometer and stopwatch near each other.

- Inaccuracy while measuring light tracing stuff with pins: pins might be tilted -> which creates a difficulty in aligning them.

- IN the planning question, all headings in the table should be given a unit, even rate.

- A graph can't be described as directly proportional if it doesn't pass through origin, so if asked, extend it to origin first.

reddit.com
u/Ultimate_Sigma_Boy67 — 2 months ago
▲ 3 r/igcse

CS P1 ULTIMATE CRAM PLAN

Let's get straight into the meat:

  1. Do NOT go over the syllabus fully, unless you study over 10 hours a day, this will be an overkill you're going to burnout and get devastated.
  2. Only use flashcards for units to briefly go over them, in this step you must also not spend much time, since the majority of the time should be directed to solving past papers.
  3. After you've done the basic stuff, start solving past papers at the rate of at least 3 per day. This is cs theory, and each paper will take you an absolute max of an hour to finish + do papers ONLY from march 2023 to march 2026, while priortising newer papers.
  4. After you've finished, a paper, go over the mark scheme thoroughly, and mark your paper strictly. Each mistake should be put in a log, wtv you struggle with search it online, look through youtube, notes..etc
  5. Continue with this same pattern till exam day, in which you primarily study from the mark scheme.

Notes:

1) Myst notes: https://drive.google.com/file/d/1hD2rpsCXT3R0FPTOC_qzjasbMV5zJfw3/view

2) Pup notes: https://docs.google.com/document/d/1fglgriTrQ6SA7upT9oqup_G-KFfW_A5uHmtQERYNz9I/edit?usp=sharing

For the flashcard part, I got you, and in this folder you have flashcards covering all units briefly, in which you can learn them easily, basically mark scheme condensed into lessons:

https://quizlet.com/user/amin_xiv/folders/igcse-computer-science-0478

For important, repetitive, and hard questions, there's a set that has about a 100 questions(going to be updated as I solve more past papers), in which the questions are present with their mark schemes:

https://quizlet.com/sa/1160384952/p1-important-rare-and-maybe-confusing-questions-flash-cards/?funnelUUID=513e661d-bef1-4625-b4b4-74af961daaf2

Note: as for the p2 part, It's still not mature as I still didn't focus a lot on p2, tho after finishing p1, the questions deck will be updated.

reddit.com
u/Ultimate_Sigma_Boy67 — 2 months ago
▲ 3 r/igcse

0478 COMPUTER SCIENCE P1 ULTIMATE CRAM PLAN

Let's get straight into the meat:

  1. Do NOT go over the syllabus fully, unless you study over 10 hours a day, this will be an overkill you're going to burnout and get devastated.
  2. Only use flashcards for units to briefly go over them, in this step you must also not spend much time, since the majority of the time should be directed to solving past papers.
  3. After you've done the basic stuff, start solving past papers at the rate of at least 3 per day. This is cs theory, and each paper will take you an absolute max of an hour to finish + do papers ONLY from march 2023 to march 2026, while priortising newer papers.
  4. After you've finished, a paper, go over the mark scheme thoroughly, and mark your paper strictly. Each mistake should be put in a log, wtv you struggle with search it online, look through youtube, notes..etc
  5. Continue with this same pattern till exam day, in which you primarily study from the mark scheme.

Notes:

1) Myst notes: https://drive.google.com/file/d/1hD2rpsCXT3R0FPTOC_qzjasbMV5zJfw3/view

2) Pup notes: https://docs.google.com/document/d/1fglgriTrQ6SA7upT9oqup_G-KFfW_A5uHmtQERYNz9I/edit?usp=sharing

For the flashcard part, I got you, and in this folder you have flashcards covering all units briefly, in which you can learn them easily, basically mark scheme condensed into lessons:

https://quizlet.com/user/amin_xiv/folders/igcse-computer-science-0478

For important, repetitive, and hard questions, there's a set that has about a 100 questions(going to be updated as I solve more past papers), in which the questions are present with their mark schemes:

https://quizlet.com/sa/1160384952/p1-important-rare-and-maybe-confusing-questions-flash-cards/?funnelUUID=513e661d-bef1-4625-b4b4-74af961daaf2

Note: as for the p2 part, It's still not mature as I still didn't focus a lot on p2, tho after finishing p1, the questions deck will be updated.

reddit.com
u/Ultimate_Sigma_Boy67 — 2 months ago
▲ 45 r/igcse

Quick revision flashcards, made by me while solving past papers, contains hard, tricky, rare and important questions, consists of about a 100 questions, so try to grind through them till the moment you enter the exam room:

https://quizlet.com/sa/1163684180/trickyhardrareimportant-physics-questions-flash-cards/

And this is sort of my "tips and mistakes" log, in which I write important things to keep in mind that you might miss out, and ofc all of them I've constructed them while solving past papers:

- Always round to 2 s.f

- If possible, always try to write full equations, including special modifiers such as "average" speed, which can help in C marks in case of wrong answer

- Nuclear energy is non-renewable because nuclear fuel can be used up

- When listing measurements, instead of writing "change in temperature" (for example), write "initial AND final temperature"

- Converging lenses correct LONG sightedness

- CONVerging lense is CONVex, while diverging lense is concave

- P = I^2 * R

- Kilowatt-hour is a measure of ENERGY, not POWER. It just means energy consumed by a 1000 watt appliance in a single hour

- When asked about the ratio of x to y, if it's not mentioned that it's required to outline the two rations respective to each other, always right the final

decimal, for example 55/3 or 55:3 => 18.3333 => 18

- When completing radiation equations, always include the actual radiation particle(alpha / beta / gamma) alongside the product

- Pay attention to units when solving for specific stuff in equations

- Gravitational and electric field are vectors

- Forces can't change mass nor weight

- Direction of centriputal force: 1) Towards the center

2) Perpendicular to the motion

- Free fall in vacuum doesn't depend on / affected by mass of object

- Parachutist doesn't stop in air after opening the parachute because their weight is acting on them, and if speed = 0, then air resistence must be 0

- Limit of proportionality is the point at which force is no longer directly proportional to the extension

- ...while limit of elasticity is the point at which the spring doesn't return to its original shape.

- Law of conservation of momentum: 1) Total momentum is always constant in an ISOLATED system 2) momentum before collision = momentum after collision

- Always pay attention to sign in momentum/impulse questions

- Pay attention to tables and what you're asked to write about.

- The planets were formed when a cloud of gas and dust collapsed due to "gravitational force", NOT "gravity"

- Acceleration/deceleration isn't affected by gravitational force of planet

- K = °C + 273

- When calculating pressure, the area must always be in metre squared(in the case of the unit being pascal)

- The change from liquid to gas is boiling, unless explicitly given the conditions of evaporation.

- Temperature is the measure of the average kinetic energy of the particles

- Gasses have higher rate of expansion because LESS energy is needed to separate the particles due to WEAKER FORCES

- Apparatus to observe brownian motion: smoke cell, microscope and lamp. Proceadure: put some dust into the smoke cell, and observe.

- Brownian motion can happen in liquid.

- ...replace dust with pollen grains, observe(pollen grains are hit by water particles).

- At absolute zero(-273°), the average K.E of particles is 0.

- When temperature of a gas increases, collisions with the container are 1) more frequent 2) harder..etc

- The strength of particles hitting the container is related to temperature, therefore when pressure increases due to decreasing volume, frequency of collisions

increase, but NOT strength

- Graph between K.E and temeprature doesn't start from origin, unless T was in K°.

- Sand is always hotter than the sea, due to it being solid, so it has less specific heat capactiy.

- In specific heat capacity stuff, if the object's temperature > surrounding's temperature, then then c(specific heat capacity) > actual, and vice versa.

- Accuracy of answers depends on the given data's accuracy in the question.

- Objects in equilibrium are either at rest or moving at constant VELOCITY

- If you bring two identical springs on top of each other, extension is double, and if they're besides each other, extension is halved

- In moment stuff, always change masses to kilograms.

- In a uniform metre rule, always account for the weight of the ruler if it's not balanced on its centre of mass

- To double the velocity of the fall, x4 the heighte

- Advantages of renewable resources: 1) renewable 2) doesn't produce greenhouse gasses

- Wind energy has high capital cost but low running cost.

- Pay attention to the unit of mass and the mass in the specific heat capacity.

- Electrons gain both kinetic and thermal energy when transferring energy.

- Dispersed light rays of single colours should diverge and not be parallel

- Red is the fastest in glass

- Refractive index is speed of light in vacuum/speed of light in medium.

- If the n < 1, then reverse the rules(numerator and denominator)

- TIR exhibits: 1) applies law of reflection, i = r 2) angle of incidence > critical angle 3) when a ray of light is moving towards a less optically dense medium.

- Speed of wave is frequency * wavelength, and wavelength unit depends on the unit of the speed, for example of speed is in m/s, then wavelength is in metre, but

frequency is always in hertz.

- If wavelength = gap width, then it's considered a NARROW gap

- Gravity in accretion model pulls the heavier elements, and solar wind pushes the lighter elements outwards, which causes the inner planets to be rocky and outer planets to be gasseuos.

- Angle of rotation of earth, 23.5°, to the vertical

- climate is determined by angle of sunlight, and number of daylight hours.

- Satellite types are low and high orbit, low orbit is faster, and covers less area of the earth, and vice versa.

- Comets are made from ice and rocks, while Asteroids consist of metals and rocks.

- Formation of a milky way:

`1) Intersterllar clouds`

`2) Nebula`

`3) Accretion disc`

`4) Protostar`

`5) Gravity(in) Solar winds(out)`

`6) 4 rocky + 4 gaseuous planets`

- Age of solar system: 4.5 billion years

- Age of the universe: 14 billion years

- Big bang: explosion of very hot small dense point "singularity" to form a continously expanding universe that's cooling since then.

reddit.com
u/Ultimate_Sigma_Boy67 — 2 months ago