C++

08/15/19

How to make a SIMPLE C++ Makefile?

We are required to use a Makefile to pull everything together for our project but our professor never showed us how to. I only have ONE file, `a3driver.cpp`. The driver imports a class from a... more
C++

08/15/19

What is the most effective way to get the index of an iterator of an std::vector?

I'm iterating over a vector and need the index the iterator is currently pointing at. AFAIK this can be done in two ways: - `it - vec.begin()` - `std::distance(vec.begin(), it)` What are the... more
C++

08/07/19

How do malloc() and free() work?

I want to know how `malloc` and `free` work. int main() {  unsigned char *p = (unsigned char*)malloc(4*sizeof(unsigned char));  memset(p,0,4);  strcpy((char*)p,"abcdabcd"); //... more
C++

08/06/19

Why does the order in which libraries are linked sometimes cause errors in GCC?

Why does the order in which libraries are linked sometimes cause errors in GCC?

Need help with this terminology

i need help comparing and explaining: Artificial Intelligence and Expert System EDSAC and EDVAC System Programmer and Application Programmer Information Technology and Information System Transistor... more

What is an NP-complete in computer science?

What is an NP-complete problem? Why is it such an important topic in computer science?

Simple basic explanation of a Distributed Hash Table (DHT)?

Could any one give an explanation on how a DHT works?
C

06/05/19

Why does GCC use multiplication by a strange number in implementing integer division?

I've been reading about `div` and `mul` assembly operations, and I decided to see them in action by writing a simple program in C:###File division.c #include <stdlib.h> #include... more
C

05/29/19

Const pointer in typedef?

What does this line of code do': typedef const real_T * const * InputRealPtrsType; I think it defines `InputRealPtrsType` as a pointer to a constant pointer to a constant `real_T`. `real_T` is... more
C

05/28/19

Simulink: How to use a local variable in a level 2 s-function?

I have written a Simulink S-function (Level 2) in C. The resulting block has one output and one parameter. This parameter is stored in a variable, which is defined at file scope, right after... more

01/22/17

What is the final value of the string output given the following Visual Basic code fragment?

Dim counter As Integer = -4 Dim num As Integer = 1 Dim output As String = " "   While counter < 0       num = num + 2       output = output & Convert.ToString(num)       counter =... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.