-5
votes
0answers
52 views

How to become malware analyst [on hold]

I am willing to be a malware analyst. I am 17 years old and want to be guided. I tried learning x86 assembly form (the art of assembly) but it was complex and I believe that it is very old (I don't ...
0
votes
0answers
39 views

How does the android JNI work [on hold]

I am currently trying to create an iPhone/android app I have chosen to write the model of my program in C++ since it is supported by both platforms. I have been able to compile my C++ source into the ...
16
votes
4answers
510 views

How bad is it calling println() often than concatenating strings together and calling it once?

I know output to the console is a costly operation. In the interest of code readability sometimes it is nice to call a function to output text twice, rather than having a long string of text as an ...
2
votes
4answers
1k views

Going through The C Programming Language K&R in Visual Studio

From what I have read, K&R seems to be a good place to start learning programming in general, and C programming specifically. However, I've just started the first chapter and I have a few ...
-1
votes
1answer
101 views

Programmer Analyst vs Software Engineer [closed]

So I've heard the job title "programmer analyst" and "business analyst" thrown around for software jobs recently. How do the responsibilities of Programmer Analysts, Business Analysts and Software ...
1
vote
4answers
569 views

Why would a C executable be smaller when compared to C++ executable

I'm trying to understand why the output file sizes are significantly different when using a C and a C++ compiler. I was writing a small hello world program in C and C++, I noticed that in C version, ...
2
votes
3answers
234 views

Transitioning from Java & C to C++

I learned Java and I'm pretty competent programming in it. I also learned C recently. I looked at a comparison between Java and C++ and I like C++'s features like operator overloading and its speed. ...
0
votes
1answer
91 views

Global variable in a Linux shared library

Suppose we have the following setup under Linux, .so library named "libcnt.so" and 3 user space apps: "app1", "app2", "app3". This library does 1 simple thing, it says to the app (app dynamically ...
3
votes
3answers
154 views

Organization of DLL linked functions

This is a code organization question. I got my basic code working but when I expand it, it will be terrible. I have a DLL which I don't have a .lib for. Therefore I have to use the whole ...
4
votes
1answer
534 views

Why are most GNU's software written in C [closed]

I am a Java developer, and I rarely write GUI program in C. However, I noticed that many GNU's projects, such as PSPP, R, Dia, etc., are written in C, instead of Java or C++. I personally don't mind ...
-2
votes
4answers
198 views

Benefits of porting C library to C++ [closed]

Say we take any C library such as libpng or libvorbis and convert it so that it compiles as C++ (only the minimum changes to make it compile as C++ code). Can the compiler do extra optimizations when ...
1
vote
2answers
303 views

“bug” in C++11 text by Stroustrup?

I found an apparent contradiction in the c++ text having to do with the result of the c_str() function operating on std:strings (in my copy, the definition and contradiction are on p1040). First it ...
15
votes
1answer
543 views

How to effectively cooperate in a team having mixed background/mindset regarding OOP? [duplicate]

I've been recently assigned for a new high-performance C++ project (finance) together with 3 other guys who, like, me, refer to themselves as "primarily C/C++ programmers", meaning, all of us have ...
20
votes
7answers
3k views

Writing in C for Performance? [closed]

I know I have quite frequently heard that C typically has a performance advantage over C++. I didn't really think anything else of it until I realized that MSVC doesn't even seem to support the newest ...
3
votes
2answers
157 views

How to manage memory in C interface for C++ implementation considering c++11?

I have a library implemented in C++ which has a C interface. This C interface is, for all intents and purposes, the only way to use this library. C++11 seems to discourage the use of raw pointers but ...
1
vote
4answers
247 views

How do you call one program from another?

What I'm wondering is how running programs communicate with each other, and if someone could post some sample code for how to do this, so I can try it out myself, just for educational purposes. For ...
1
vote
0answers
112 views

How to extract the active code path from a complex algorithm

I have been puzzled lately by an intruiging idea. I wonder if there is a (known) method to extract the executed source code from a large complex algorithm. I will try to elaborate this question: ...
0
votes
2answers
215 views

Shared source file between two parts of project [closed]

I have the following sort of directory structure: part1 build src part2 build src Now I have a header file that I would like to include in both parts of these projects, it will ...
3
votes
2answers
249 views

Speed difference between VM-based and compiled code [closed]

Not so long ago I was told by a senior academic that, these days, VM-based code could run nearly as fast as compiled code, but my own experience is that compiled code runs several orders of time ...
1
vote
3answers
288 views

Choice between 1-dimensional and 2-dimensional array

I'm implementing the Chessboard class to represent the chessboard. I've to implement the transformations (reflections and rotations) on the chess board possible. The possible transformations includes ...
0
votes
1answer
138 views

Is TCP message order still guaranteed when using async IO

Here the scenario I'm imagining. Two messages are transferred, both will require 2 packets each (I know you don't deal with packets directly with TCP, but on the IP level each message will consist of ...
1
vote
6answers
531 views

Coming from high-level to C [closed]

I have a web background that grants me basic understanding over programming. Some older kids wouldn't even call that programming knowledge ("any moron can do PHP/Python/Ruby"), I guess, but let's not ...
0
votes
1answer
142 views

distributed computing with remote hetrogenous machines

The way i am doing it now is using boost::asio TCP sockets handling everything manually with a main server that orchestrates the processes between the available machines, but the number of machines ...
-1
votes
1answer
101 views

A Server sending data to be processed to clients [closed]

About a year ago I had an idea in mind which was using my friends computers to help me process my data, so I programmed a socket server application with boost::asio, and gave the client part of it to ...
0
votes
3answers
415 views

Why are there so few comments in C/C++ code? [closed]

I'm a web developer primarily, and I've been learning C/C++ and trying to get involved in some open source projects. Something I find very unusual is the lack of comments in C/C++ source code (I've ...
9
votes
3answers
542 views

How should I mark types in C and C++ programs?

In this answer of mine, I used _t at end of types, which ended at best, controversial. This is the practice I use in my current projects. typedef struct { int x; int y; } point_t; This was ...
1
vote
2answers
299 views

Drawback of mixing C++ code with C for performance purposes

Often you can see answers like “Avoid using C libraries in your C++ code“ or “This can be rewritten using STD/Boost in pure C++“. I understand C++ produces more maintainable code and has many ...
5
votes
5answers
645 views

Teaching a course on intro to programming, in C++: Do I teach C-style casts? [closed]

I'm currently redesigning a college level first semester graduate course on Intro to Programming, in C++. Note the comma; the course is introduction to programming, and C++ just happens to be the ...
2
votes
1answer
290 views

Clearing the lowest set bit of a number

I can see in this tutorial on bit manipulation, under the heading "Extracting every last bit", that - Suppose we wish to find the lowest set bit of x (which is known to be non-zero). If we ...
1
vote
1answer
500 views

What is the difference between string.c_str() and &string[0]?

What are the differences between string.c_str() and &string[0]? Regarding performance my guess is that &string[0] is a little faster than string.c_str() as it doesn't require a function call. ...
1
vote
4answers
546 views

Why languages that compile to C/C++ generate unreadable, cryptic code?

I'm willing to compile certain language to C or C++ for some speedups. My idea was, though, to generate readable code and use structures such std::vector and similar wherever I can, expecting CLANG to ...
0
votes
5answers
2k views

Reference vs dereference pointers in arguments C++/C

OK, I'm facing this all the time in many functions I write, which should I use? void sth(int* a) void sth(int& a) Which one is faster, regarding two separate occasions: a is a small variable or ...
-1
votes
2answers
2k views

Want to create a simple gui app using C++ but dont know what to use [closed]

I have learned C++ to an intermediate point and now I'd like to create something beyond a console program. I would like to create a simple program that grabs info from specific text files and displays ...
2
votes
3answers
1k views

Is there any alternative to function pointers in c++?

I am a novice c++ programmer who kept an idea that function pointers are a thing of C and OOP in C++ does not recommend its usage. I know what I write here is vague/broad. But it will be great if ...
4
votes
3answers
2k views

Is it possible to combine C/C++ with web languages? [duplicate]

I would like to create a web application (meaning that will run from browser). The point is that I want to write just the UI in HTML5 + CSS + JS (or maybe even some PHP). On the other hand, I want to ...
4
votes
3answers
288 views

Is it OK to use same variable to store similar stuff sequentially? [duplicate]

Say I have a variable name len in a function and several strings. Can I use this to store length of those strings one after the other or should I create separate variables? Basically this: size_t ...
8
votes
6answers
894 views

Should my team use some common well-regarded coding standard as a basis for its own?

The R&D team I'm in has decided to adopt a coding standard. We have only recently formed, and have too little code and common coding time of our own to base our standards/conventions document on ...
17
votes
2answers
691 views

Why does Java not put the filename in args?

In C and C++, the main method holds the filename in the first position of the array at argv[0]. In Java, however, the filename is not included in the args string array. Is there a practical reason ...
2
votes
3answers
347 views

How can I effectively manage long-term feature development and short-term bug fixing at the same time?

We have a huge C, and C++ code base. There is a plan to add a new feature into the existing system, but, this should happen only after 3 to 4 months. So, we are looking for best possible options. ...
0
votes
1answer
772 views

Best way to quickly explore/grok open source C/C++ projects? [duplicate]

I'm looking for a suggested workflow for quickly being able to download various c/c++ open source projects and then begin intelligently navigate sources. "Intelligently" means being able to jump ...
9
votes
3answers
844 views

Is it possible to compile a higher level language to readable C++? [closed]

C++ is a great language in many ways, but some things in particular are cumbersome to write without an IDE. As a VIM user, it would be very interesting if I had access to a higher level language which ...
21
votes
4answers
710 views

C++ Linkage Languages other than C?

The C++ language allows intermixing of both C++ and C in one source file. For example, extern "C" { struct bar { /* ... */ } } Does C++ or has it ever supported any other "linkage languages" ...
0
votes
2answers
335 views

What is the exact syntax of inline?

CASE 1 (Definition and declaration in same source file) Suppose both my prototype and definition of global function is in .cpp file. Where should I write inline keyword to make compiler know? In ...
3
votes
4answers
1k views

What do other languages offer when it comes to infrastructure technology that could indicate its advantage over C in the future?

I have been going through interview questions and I saw one which made me stop and think for a while. It starts with a quote and asks about your interpretation and whether you agree or not. "For ...
0
votes
4answers
889 views

How should I go about developing some basic C/C++ knowledge so that I can grok the concepts written in some Classic software programming books? [closed]

I know Java and JavaScript pretty well. I have never really worked on C/C++. But at this stage of my career I feel that the fact that I do not have adequate knowledge on C/C++ syntax(especially ...
18
votes
7answers
2k views

Does modular programming affect computation time?

Everyone says that I should make my code modular, but isn't it less efficient if I use more method calls rather than fewer, but larger, methods? What is the difference in Java, C, or C++ for that ...
5
votes
2answers
481 views

Learning YACC nowadays, does it make sense? [closed]

I have a huge project that is using YACC and I would need to fix a bug in it. I might ask someone else who wrote that to fix it but I'm interested in how compilers work. Does it make sense to learn ...
1
vote
1answer
337 views

register variable in C and C++

I know the concept of register variable and it's use cases but there are few questions in my mind based on what I have tried. I cannot access the address of a register variable in C though I can do ...
2
votes
4answers
1k views

Help with learning the C++ Qt Framework [on hold]

I've been a longtime PHP web developer. But now I've reached the limits and web doesn't fascinate me anymore. I am interested in learning cross-platform development. I have learned Java for almost a ...
2
votes
1answer
364 views

Are C or C++ The Only Viable Languages for a GC

Background I have just finished writing a compiler for a functional language compiling to the JVM as a learning project. However, since I'm just doing this to learn, I thought it might be interesting ...