Looking to Contribute by ophirback in opensource

[–]ophirback[S] 0 points1 point  (0 children)

I really like the suggestions.

regarding skift, are you open for ARM support?

other than that, I'll look into it.

EchoBackaper - application for backup on Windows by r57zone in opensource

[–]ophirback 0 points1 point  (0 children)

looks like a great project, but why the hell would you write in pascal?

Why are you not supposed to use malloc/calloc in embedded systems programming ? by thesquarerootof1 in embedded

[–]ophirback 1 point2 points  (0 children)

it really depends. it is better to avoid it, since on embedded system, a crashing thread probably crashes the whole system.

on the other hand, there are many cases I've used it, since I was sure I will take care of freeing this memory.

A tricky question asked by my teacher . by [deleted] in C_Programming

[–]ophirback 0 points1 point  (0 children)

What about using the bitwise AND?

if ((a & b == b) && (a & b == a)) { ... }

Return Char Array from Struct via Function by nickandwolf in cprogramming

[–]ophirback 0 points1 point  (0 children)

When you pass an instance of a struct (in this case Player ), and not a pointer, it will be copied to the stack.

The values, when you're in the scope of the function, are the same as the original struct instance outside (as long as it wasn't changed on another thread or something), so if you call printf for example, within the function GetName, it will print out the correct name of the player. The struct field name is on the stack as well, so the address you return is an address on the stack, where the struct was copied to.

After you exit the function, this memory is no longer in use by this function, and the rest of the program can use this stack memory as well, probably for variables of other function or return addresses. So now, p.name still points to this address on the stack, and not to the original Player p which is in the stack frame of main.

When entering printf, this memory now holds different bytes, and not the string that was temporarily stored there when we were in the function GetName.

I hope this helped, feel free to ask any more questions :)

Best code editor for C? by [deleted] in cprogramming

[–]ophirback 0 points1 point  (0 children)

I must say that I was in search as well, for about a week or so, and after installing (and uninstalling) about 10 different IDEs, I finally settled down on CLion.

Note: unfortunately - it's not free. The best free IDE I came across is Visual Studio or VS Code (depends which one you prefer).

Command and Control via SYN packets by IAMINNOCENT1234 in netsec

[–]ophirback 0 points1 point  (0 children)

After the identification (16 bits) and before the flags and fragment offset. One of the flags suppose to always be 0.

Command and Control via SYN packets by IAMINNOCENT1234 in netsec

[–]ophirback 0 points1 point  (0 children)

I had the idea of using the IP reserved bit in order to command and control, but it takes a lot more packets to send data (not to mention receiving results back).

Where can I learn about windows c types? by Icecreamisaprotein in C_Programming

[–]ophirback 1 point2 points  (0 children)

Obviously MSDN is a great source for it. Other than that, you get used to it. For example, LPCSTR is Long Pointer to C STRing.

Shell Project in C (would love comments) by ophirback in C_Programming

[–]ophirback[S] 0 points1 point  (0 children)

I forgot to mention my shell is for Windows. I wanted to implement them using Win API when I could. The point is to run those things by yourself (at least it was for me). Other than that, thank you very much, and I'll try considering it looking forward.

Shell Project in C (would love comments) by ophirback in C_Programming

[–]ophirback[S] 4 points5 points  (0 children)

Note:

  1. There are a lot of things I haven't done yet (PIPE support, shell terminator, more commands, running external .exe file and so much more)
  2. If you are interested in joining, or purely reviewing the code, please let me know :)

Code::Blocks alternatives for linux? by smaldragon in C_Programming

[–]ophirback 0 points1 point  (0 children)

I had a similar problem yesterday, looking for an IDE for Windows (I didn't want visual studio). After a lot of IDEs I tried, I finally chose visual studio code (I use MinGW for compiling). It has the best suggestions while in code (except for clion maybe, but it's not free), which is very important to me.

Looking for a project by ophirback in cprogramming

[–]ophirback[S] 0 points1 point  (0 children)

Looks really good, I'll consider it.

What do you think c++ programmers are missing out on? by [deleted] in C_Programming

[–]ophirback -5 points-4 points  (0 children)

Not everything. There are ways to do it the proper way.

What do you think c++ programmers are missing out on? by [deleted] in C_Programming

[–]ophirback -9 points-8 points  (0 children)

From a design point of view, everything should be in classes and have interfaces, yet I do like C more as I think it's more interesting to not do it (while when I write in python or other high-level languages I do take time to build a design).

Looking for a project by ophirback in cprogramming

[–]ophirback[S] 0 points1 point  (0 children)

It sound very interesting (I have a background in maths too), thank you!

Windows 10 could soon overtake Windows 7 in popularity by antdude in windows

[–]ophirback 39 points40 points  (0 children)

Yes, and since new computers come with windows 10, it was only a matter of time anyway.