-4
votes
0answers
53 views

Can I get right guidance to enter software development? [closed]

I am beginner in software development As a beginner I know C/C++ not at expertise level But I am liking Python Give me right guidance
1
vote
4answers
214 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
89 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
169 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
219 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
2answers
206 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
101 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 ...
0
votes
6answers
487 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
129 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
82 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
377 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
520 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
275 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
578 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
264 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
415 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
489 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
1k 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
1k 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
274 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 ...
6
votes
6answers
619 views

Should my team use some common well-regarded coding standard as a basis for own 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
674 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
323 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
728 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
790 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
701 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
302 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
781 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
462 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
293 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 ...
1
vote
4answers
1k views

Help with learning the C++ Qt Framework

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
356 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 ...
16
votes
3answers
1k views

How to solve the problem of nested comments

It appears in not just one language that comments can't be nested. Do you have a good solution for this problem? One workaround in C/C++ and Java is to only use the single-line comment but it becomes ...
1
vote
1answer
124 views

Design for migrating to Multitenant architecture

We are in a process of redesigning our product code in such a way so as to support multitenancy. Currently the implementation is such that one product deployment caters to only one customer. Thus ...
7
votes
5answers
550 views

I believe I have mixed C and C++ code when I shouldn't have; Is this a problem and how to rectify?

Background/Scenario I started writing a CLI application purely in C (my first proper C or C++ program that wasn't "Hello World" or a variation thereof). Around midway through I was working with ...
-1
votes
2answers
99 views

I'm trying to figure out which functions from one C library are being used by C project. Does anyone have a simple solution? [closed]

To be specific, I want to know which function/types in libpri and being used in the Asterisk project. I'm not traditionally a C programmer, but I know some basic stuff because I took a class in ...
0
votes
3answers
3k views

Char and unsigned char [closed]

Where is unsigned char used in C ( please tell about some real-world examples )? Why would we need both char and unsigned char? Char ranges from -127 to 128 ( 8-bit integer ) Unsigned Char ranges ...
-2
votes
2answers
720 views

Why is C++ preferred over C for commercial applications? [closed]

I program in C mostly. However, it is pretty obvious that many more commercial applications are done in C++. As far as I can tell, C++ is a very complex language, with seemingly convoluted syntax and ...
10
votes
4answers
1k views

Is it possible to use the Intel C/C++ compiler on Linux to create object files to be linked on Windows?

Why? Depending on your source the Intel compiler is likely or most definitely the compiler generating the fastest executables for the x86 architecture (5 to 100 % execution time improvement). Intel ...
-3
votes
4answers
4k views

speed/performance of image processing python vs java vs c [closed]

I have a project in which I take a handful of images and coordinates, and combine them all into a single image based on those coordinates. (so not really image processing, just image ...
10
votes
4answers
804 views

Why do some programmers categorize C, Python, C++ differently? - regarding level [duplicate]

I am taking an introductory course on python and the instructor says that python is a high level language and C and C++ are low level languages. It's just damn confusing. I thought that C, C++, ...
-2
votes
1answer
603 views

Is C a pre-requisite in order to learn C++ effectively? [duplicate]

I only have programming experience with high-level languages, as well as with DBMS. Now, I would like to get into C and/or C++. My question is: Is the C language a pre-requisite in order to learn C++ ...
0
votes
1answer
216 views

Did I answer this correctly and concisely? [closed]

By email I just answered my brother who is learning computer programming that C++ and Java are more similar than C and C++ even though C++ is nearly a superset of C. Do you agree? AFAIK Stanley ...
8
votes
2answers
5k views

Why is C so high in TIOBE index of popularity, while C++ is just under here too, but not as popular? [closed]

I can't get my head around this. If C is so much used, but C is not C++, can someone explain to me the most important reasons that makes C more used than C++ ? Where is all this C code written for ? ...
2
votes
2answers
827 views

Why can't we declare 'extern C' for C++ macro's?

I am new to C/C++. Wanted to know why we cannot declare 'extern C' for C++ macro's similar to methods/functions...which will allow macro's defined in C++ file to be accessed in .c files. Thanks in ...
4
votes
3answers
4k views

Understanding stack frame of function call in C/C++?

I am trying to understand how stack frames are built and which variables (params) are pushed to stack in what order? Some search results showed that the C/C++ compiler decides based on operations ...