C++

C++

Hi there,

I am learning coding in C++. I would like to start, by making a full functional calculator.  All of them are pretty done but I want some more options which are present in a scientific calculator, like binary calculation.  I don't see any function for this. So I guess I have to make one.

I have been trying to add the binary to decimal conversion. I know that the basic process is:

But how do I take the digits 1 at a time.  Should I take the binary number as a string or by integer? Please help.

  • 1072 views
  • 7 answers
  • 23 votes

Hello Everyone,

I have created a connected graph, where each node represents some fact. The centre is the point of start. You may think of it as a mind map. I want to search the map in a Depth First Manner. I understand the concept but don't know how to apply it. Here is a pseudocode

dfs(vertex v)
    {  
  visit(v);
    for each neighbour w of v
        if w is unvisited
        {
        dfs(w);
        add edge vw to tree T
        }

  • 1277 views
  • 8 answers
  • 23 votes

Hi,

I am doing some analytical program in C++ involving a lot of prime numbers. I don't think checking a number every time, whether it is prime or not would be a good idea.

So I just thought that if I could pre generate all the prime numbers in a list.

But it is taking too much. Time.

vector<int> prmn;
For (int i=2; I<100000; ++i)
If (isprime (I)) {
prmn.push_back(i);
}

Almost 4-5 second. I hate to find it upto 1000,000.

Is there any better way?

  • 1360 views
  • 7 answers
  • 14 votes

Write a class to input the name of student and marks of three subjects, calculate the total marks as well as average marks. Each subject has a maximum of 100 marks.

  • 960 views
  • 8 answers
  • 26 votes

Hi.

I am trying to understand this code:

  • 1145 views
  • 7 answers
  • 26 votes

Hi there.

I am just beginning to learn some C++ programming. It is quite interesting and flexible. I think it is a good habit to understand algorithms through implementing them in code. I studied some ways to represent graph in the computer. It seems to me that adjacency matrix is most simplest.

I have heard that they take a lot of space. My question is, how do I use adjacency list to reduce this memory consumption? Do I have to allocate the array size dynamically during runtime? How do I do it?

Is there any simpler way to manage adjacency list?

  • 2839 views
  • 7 answers
  • 26 votes

Hi,

Thank you for reading my post. I am making a simple IDE for C++.  I have a compiler installed. I created a IDE like text editor where I can type my code and save it. Now I want a button which can compile the code on click and output the result. How do I do it? Is there anything as simple as system() in C++? I have googled for system() in java. But not much of a success.

Thanks again.

  • 1299 views
  • 8 answers
  • 27 votes

Hi.

I am a student of CSE. I am doing some project using open CV. I need to load a image and save each of the regions predefined in the program, as a separate image. How do i do it in C++?

For example, suppose I have a form with 8 fields, I shall give the pixels from where to crop and the lengths along with it.

The program should crop the image according to the location.

  • 1570 views
  • 8 answers
  • 25 votes
  • 1434 views
  • 8 answers
  • 26 votes

Hi,

I recently built a Robotic Arm to move objects by human Control. The model was fine and effective. So my new partner who is an Image Processing expert wants to work as a team to expand it.

The problem is, he is on Linux. I don’t know much of Linux. So is there any way I can interface the controller with a PC running Linux, using C++?

The current design uses a small keypad, having 12 keys to control the arm(8) to move (4) to up/down/hold/leave . Each of them generating a 8 bit signal. All I need is to generate the signal from a PC rather than a Controller pad.

  • 1280 views
  • 7 answers
  • 26 votes

Latest Articles

Benefits Of Storing And Sharing Documents In The Cloud

Have you ever wished you could access your important documents anytime, anywhere? With cloud document storage, that wish becomes a reality. In today’s fast-paced world, secure and accessible document management is more essential than...

From Lost To Found: Restore Your Data On Windows 11

Are you worried about data you lost during some operation on your Windows 11? Don’t worry; we are here to guide you on how to recover the lost data from your Windows device in...

How To Differentiate Demand Generation From Lead Generation

Lead generation and demand generation are two of the business strategies that help businesses grow. It creates a pipeline of interested customers looking to find out more. Lead generation on the contrary, is able...

Latest Blogs

Top 10 New Laptop Entrants That Shook The Public

The finest laptops are powerful enough to do your daily tasks, comfortable enough to use all day, and power-efficient enough to ensure you don't run out of battery power unexpectedly. Of course, all these...

10 Facts About The Dark Web

Before getting into knowing the facts, let’s have a brief about the Dark Web. The dark web is the data of the World Wide Web that is accessible only through special software, combinations, or...

Top 10 Latest Steam Cleaner Machines

While looking for a chemical-free way to clear and purify both durable and low grounds in your home, a steam cleaner is an excellent solution. With a spurt of superheated steam, this cleaning equipment...

Latest Tips

Top 10 Internet Monitoring Software

Internet monitoring software keeps a log of all internet activities. You can install this type of software on your computer remotely or by the administrator. An operating console controls this software. This type of...

Top 10 Best Partition Manager Software

A Hard Disk Drive is usually partitioned into various smaller drives for optimization. A partition manager helps make this process easier and more efficient. Here, let’s discuss the top 10 best partition manager software. 1....

Top 10 Best Online Music Production Software

Music production is the initial stage of any song. Music production can be done either in studios or at home using an online music production software. Here, let’s discuss the top 10 best online...