C++ Definition and 813 Threads

C++ () is a general-purpose programming language created by Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significantly over time, and modern C++ now has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation. It is almost always implemented as a compiled language, and many vendors provide C++ compilers, including the Free Software Foundation, LLVM, Microsoft, Intel, Oracle, and IBM, so it is available on many platforms.C++ was designed with an orientation toward system programming and embedded, resource-constrained software and large systems, with performance, efficiency, and flexibility of use as its design highlights. C++ has also been found useful in many other contexts, with key strengths being software infrastructure and resource-constrained applications, including desktop applications, video games, servers (e.g. e-commerce, web search, or databases), and performance-critical applications (e.g. telephone switches or space probes).C++ is standardized by the International Organization for Standardization (ISO), with the latest standard version ratified and published by ISO in December 2020 as ISO/IEC 14882:2020 (informally known as C++20). The C++ programming language was initially standardized in 1998 as ISO/IEC 14882:1998, which was then amended by the C++03, C++11, C++14, and C++17 standards. The current C++20 standard supersedes these with new features and an enlarged standard library. Before the initial standardization in 1998, C++ was developed by Danish computer scientist Bjarne Stroustrup at Bell Labs since 1979 as an extension of the C language; he wanted an efficient and flexible language similar to C that also provided high-level features for program organization. Since 2012, C++ has been on a three-year release schedule with C++23 as the next planned standard.

View More On Wikipedia.org
  1. K

    C/C++ Creating Threads in Java or C++: Balancing Writing and Deleting in Shared Files

    Java or C++ - Threads HELP! I need help with this program. I got five others to do and I won't have time to do it and it's apart of my final exam for next Tuesday, so here is my question I need: Create 5 threads which share a file and let "even" threads write to a file, and let "odd" delete...
  2. S

    C/C++ Problem in c++ in writing an algorithm

    Hello, please help me to find the problem in algorithm. My task is to read from file hotel visitor's info (name/surname, date of arrival, date of departure, room number). Than, to contract similar room numbers and write near the overall number of days in particular room. So everything is good...
  3. R

    C/C++ Where Can I Find the Best C++ Tutorials for Quantitative Analytics?

    well I've been putting this off for a good decade, but I really need a crash course of sorts in C++. I'm weeks away from graduating with a theoretical physics Ph.D and I am proficient in matlab. I want to move into quantitive analytics which involves building computer models to help traders...
  4. N

    Comp Sci Depreciation Calculator in C++: Calculate Values & Validate Data Using Arrays

    My Homework is write a program to show the depreciation of an item each year during 10 years, for a porcentage given. The prgram shoul include: 1- Data entry validation 2-Calculate all the values for each year,and tehn of calculate all the values should show de results. 3-If the final value...
  5. N

    Comp Sci Depreciation Program in C++ with arrays

    Hi, i have did my program ccorrectly, but my profesor ask me to do with arrays and i don't know how to do thisprogram wuth arrays. Can anyone helps please?... I talk with my profesor and see my prgram, and told me that it is all ok , but the only mistake is that i don't use arrays how the work...
  6. F

    C/C++ Finding Perfect Number with C++

    I am supposed to write a program to test a user-provided number to see if it is perfect. Also, I have to use a subroutine to do the test, and call to that in the main program. Finally, I must use a boolean to control the final output. I understand that it would be SO MUCH easier if I could...
  7. N

    C/C++ How to Fix Undefined Reference Error in C++ Matrix Constructor

    Hi, I have a matrix class which I defined myself constructor is: Matrix::Matrix(unsigned s1, unsigned s2, unsigned s3, unsigned s4) { s1_ = s1; s2_ = s2; s3_ = s3; s4_ = s4; data_ = new double[s1*s2*s3*s4]; } I try to call it using: Matrix field(NX,NY,NU,NV); Where NX, NY, NU, NV...
  8. N

    Comp Sci How to Modify C++ Code to Create a Center-Aligned Pyramid?

    I need to do a pyramid in C++ like this one: * * * * * * * * * * * * * * * buti just know how to do the figure at one side: * * * * * * * * * * * * * * * # include <stdio.h> # include <math.h> void main() { int count,count2...
  9. T

    C/C++ C++ (Borland builder 4) question

    Hello I just read a thread in the physics forums (it might be out of date) but it is about a 2d orbit simulation and I am trying to do the same thing my question is not about the physics or the math but instead how do I use the timer in Borland Buidler 4 C++? my plan is this I start...
  10. H

    C/C++ Getline() Help for C++ Class: Assigning Multiple Variables from One Line of Data

    I am just in a basic C++ class in high school. I am assigned to a project [ Its really simple, but i am having problems with getline] I am suppose to make a program in which, the all data is entered into one line, and i need to use the getline function to take that data, and assign it to...
  11. F

    C/C++ Printing from Visual C++ output

    I need to be able to print the output from my c++ program, which obviously comes up in a dos screen. Is there an easy way to print this without writing it into the code? Any help would be greatly appreciated.
  12. R

    Comp Sci Solving C++ Function Problem in Visual C++ 2008 Express Ed.

    In our C++ class, we're learning to use functions. In this problem I am working on is to use 4 functions: 3 functions to get your first name, last name, middle initial, and one function to display the your full name. I wrote the program, but can't get it to run. I've looked over it several...
  13. T

    C/C++ Need help soon with C++ program using pointers and arrays

    Okay so I got the majority of my program complete, however when I try to run it it doesn't display the proper value of the average. I think I somehow messed up using my pointers and arrays, but I can't locate the problem and I've spent hours trying to fix it to no avail. see comments for better...
  14. S

    C/C++ The following C++ program does not compile

    cout << "2 + 3 * 5 = " 2+3*5 << endl; do I just need to put it as cout << "2 + 3 * 5=" << (2+3*5) << endl;
  15. rootX

    C/C++ Using Const Object & Variables in C++ Functions

    void do_something( const Object & ); How I can refer to to the passed in variables when I implement these functions. let's say I am implementing as following: template<typename Object> myclassname::do_something(const Object &) { //how I can use the object } And, also what...
  16. W

    C/C++ How is the vector<hit>::iterator itr; line used in this code?

    I came across a snippet of code like this: protonPropagator pp; vector<hit> hits; vector<hit>::iterator itr; for(int i=0;i<5;i++){ hits.clear(); //x,y,z,E,theta,phi hits = pp.compute(startX,startY,startZ,startE,theta,phi); if(hits.size()>0){...
  17. R

    C/C++ Need recommendations for a good C++ GUI book

    Need recommendations for a good C++ GUI book... ... or an on-line tutorial. Thanks.
  18. H

    C/C++  Learn OO C++ | Tutorial & Course Notes

    Hi, The sticky on the c++ was great, thanks, but can anyone recommend a tutorial/set of course notes on the more OO side of c++? thanks
  19. G

    C/C++ Understanding Ampersand (&) in C++

    I am totally confused about one peculiar thing in C++. The "&" as far as I know from C is used to access the address of a variable. When calling a variable by reference, I used to do it with the &'s and *'s (pointers). I am taking a look at deitels' book on C++, I saw the same pointer...
  20. C

    Comp Sci How to Simulate and Track the Evolution of a 128x128 Matrix in C++?

    1. Show the evolution/reduction of the system of a 128x128 matrix with a random seed of (1.0) and with the filling probability of 0.8. Save as a square matrix in a text file(*.txt) that has tab delimited columns and uses newline as row terminator. Save each iteration as a separate file with...
  21. T

    C/C++ The Financial Training Academy c++ problems

    hi every one viewing this post I guess i am having a grand start learning c++...where do i get good problems that are not as tough as the acm problems ? please HELP ...
  22. I

    C/C++ Is it necessary to learn C++ before C# for a hardware design thesis project?

    I have a hardware design thesis project and I'll be required to write a desktop windows application that will interpret data from a wireless blue tooth device. I'm currently looking at the Microsoft visual studio express dev environment and tutorials regarding C++ and C#. Now most of my...
  23. M

    C/C++ C++ programming(access to sound card)

    hello,How can I access to sound card in lcc? I mean getting data and so on.could you give a simple example? thanks
  24. L

    C/C++ C++ to Assembly: Convert, Interpret & Understand

    Hi all, I have this small function in C++ void myfunc(int a, int b) { int c = 1; int d = 2; c += b; d += a; return; } the assembly code and my comments follow: subl $8, %esp ;; subtract 8 from %esp, what we are doing here is decrementing the stack pointer by 8 and...
  25. H

    C/C++ Should I Learn PHP Before C++ for University?

    Hi, I was thinking of learning c++ as it would help me in my first year at university. However, someone told me that i should learn php first as it is easier and then learn php. Is that true? If not then are there any good tutorials on the internet for C++? Thanks.
  26. M

    C/C++ Define large number. check this. c++ project

    For the purposes of this problem we will define a large number as a positive whole number with at least eight digits. For example, 123456789 is a large number. Large numbers must NOT be expressed in exponential form. Write a program that: (1) asks for two inputs. WHAT IS THE FIRST...
  27. S

    C/C++ Learn C++ Programming with Comprehensive Documentation

    Hi, I have started programming with java and now I am trying to learn C++ by myself. What a real problem for me is that I don't know which methods I am going to use for a specific problem. Is there any documentation or API that I can use for C++. For instance this; #include <iostream> using...
  28. O

    C/C++ What are the pros and cons of different C++ compilers for scientific computing?

    Hello: I need to write some numerical integration and do Fast Fourier transforms in c++. I am running MS OS on Intel Duo core processors. Earlier post suggested downloading libraries such as MLK. Since I am running on Intel, I have found Intel's MLK library. I will need other libraries...
  29. O

    C/C++ How to Implement FFT and Linear Optimization in C++?

    Dear All: I am finding that for the computational estimation that I need, I would not be able to do this in MATLAB. Is there a good tutorial that you would recommend for writing and running our own functions, such as inversion of fast Fourier transforms and linear optimization, in C++...
  30. E

    C/C++ C++ Error: Underscores in Function Names

    I got the following error when I tried to compile some code: error: `angle_between' cannot be used as a function I changed the function name to "function1" and it compiled. Since when did C++ not like underscores in function names?
  31. C

    C/C++ Solving Error in C++ Digit Algorithm Program

    I wrote a program to find the number of digits of an integer, but I always get the wrong result. Could someone point out the error? Here's the source code: #include <iostream> #include <cmath> using namespace std; int main() { int i=53443; cout<<log(i); return 0; }...
  32. R

    C/C++ How to Create a Spiralling Algorithm in C++ for Printing Patterns

    Hey, I got an assignment to write and algorithm in C++ to print this pattern: 35 34 33 32 31 30 16 15 14 13 12 29 17 04 03 02 11 28 18 05 00 01 10 27 19 06 07 08 09 26 20 21 22 23 24 25 As you...
  33. B

    C/C++ C++ code not compiling correctly

    I'm pretty sure I wrote the correct code for the quadratic formula and yet Dev-C++ continues to find a problem with my code. I will post the code I've written: #include<iostream.hpp> #include<math.h> int main() { double root1,root2,a,b,c,root; cout << "Enter the...
  34. O

    C/C++ Can you append digits to a variable in c++ or python

    Say you have a variable x, that is of type int. x = 1; I just want to create a while or for loop so that each time it runs it adds another digit to it, such as: 12 123 1234 or 1, 11, 111, 1111, and so on.
  35. B

    C/C++ Having trouble running C++ compiler

    The type of compiler I am using is Dev-C++. I have no problem compiling my code and my compiler has generated no errors. However , when I try to run my code, The command prompt for like a nano-second and disappears and I have no idea of how to retreive it .
  36. D

    C/C++ C++ List Insert Function: Out of Range Errors

    void List::insert(int index, const ListItemType& newItem) throw(ListIndexOutOfRangeException, ListException) { int newLength = getLength() + 1; if ( (index < 1) || (index > newLength) ) throw ListIndexOutOfRangeException("Bad index in insert"); else { // try to...
  37. N

    C/C++ Even summation with recursive function in c++

    Hi, I'm a beginner in C++. I wan't to write this program: Write a program that asks the user to enter n numbers –where n entered by the user- and calculates the sum of even numbers only. main function asks the user to enter n and then calls the recursive function Sum to read the values...
  38. M

    C/C++ Numbers in Ascending Order in C++

    i have to write such a program that takes 10 integers from user and show them in ascending order. My attempt was --- #include<iostream.h> #include<conio.h> int main() { int a[10]; for(int i=0; i<10; i++) //this loop is used for getting the 10 integers from user cin>>a[i]...
  39. R

    C/C++ Sovling schrodinger's equation in C++

    i need help coming up with a way to solve for the eigen vectors of schrodinger's time independant equation in c++. so i want to write a class that uses the shooting method, but i am not sure how to do that.
  40. S

    C/C++ C++ operator overloading and private members

    Good evening I'm in the midst of reviewing for my exam, I've come across a piece of code I don't understand. It is as follows: ////////////////////////// #include <iostream> using namespace std; class number{ private: int value; public: number(int v){value = v;} void...
  41. W

    Comp Sci Solve C++ Leap Year Function Homework

    Homework Statement Write a function that prompts the user to enter a year and that returns a 1 if the entered year is a leap year, and a 0 otherwise. A year is a leap year if it is divisible by 4. In general, a year is not a leap year if it is divisible by 100, unless of course it is...
  42. T

    C/C++ Heat equation finite difference in c++

    Hello, I'm currently doing some research comparing efficiency of various programming languages. Being a user of Matlab, Mathematica, and Excel, c++ is definitely not my forte. I was wondering if anyone might know where I could find a simple, standalone code for solving the 1-dimensional heat...
  43. R

    C/C++ Understanding C++ Program Inputs: A Beginner's Guide

    I'm a beginner and currently learning programming by myself. when I read a book I came across an example which I don't quite understand. #include <iostream> using std::cout; using std::cin; using std::endl; int main() { char string1[ 20 ]; // reserves 20 characters...
  44. L

    C/C++ Running a Fortran 77 program in a C++ enviorment/program

    I hope someone out there can help me out on this one. I have intermediate C++ experience, just a working level knowledge, however my prof. threw me a project to work on and where I am at now I have no experience with. So this is what's up, I have a massive fortran 77 program...that does some...
  45. M

    C/C++ Is the Semicolon Used as a Statement Delimiter in C++?

    Is the semicolon (;) used as statement delimiter in C++? I have been knowing that semiclon is statement terminator. Another confusion: I think, we can write as many as statements we wish in a single line and of course separating them by semicolon. But to ensure program readability we...
  46. A

    C/C++ Measuring Time Elapsed in C++ for Accurate Time Tracking

    I am writing a program and I need to measure the time it takes for a particular function to execute. Here is the code I am using to get familiar with time.h #include <stdio.h> #include <time.h> #include <iostream> using namespace std; double diffclock(clock_t clock1,clock_t clock2)...
  47. 2

    Comp Sci Why Does My C++ Secant Method Program Only Find Two Roots?

    so i worte this and it works somtimes. the function I am trying to find the roots of is 2x^3 - 6x^2 + 3x + 1 the program i wrote will find two of the roots but i can't get the third. I know the secant method it sensitive to the interval that you pick so i was thinking that was the...
  48. C

    C/C++ Solving C++ Complex Array with Time-Dependent Schrodinger Equation

    Hi, I've been trying to write a program to solve a propagation of a wave packet using the time dependent schrodinger equation. and I noticed I would need to use complex numbers. I know that I need to use #include<complex> I declare my array, and I started with a simple 1-d array...
  49. N

    C/C++ Download Java & C++ eBooks for Home Learning

    hii i need a link that i can downlaod from it books (dammes series) about java & c++ because i am learn it in home
Back
Top