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.
okay so they asked us to make an entire calendar where the user inputs the first day of the month and month itself and a calendar is generated for an entire year..
so far I've gotten to being able to generate a good thingi for a month.. and well I've used a while loop to repeat till the months...
Hi guys, I was wondering if you could help me with the following:
1.I declare a class, then put public members into it.
2.Then I make member functions that return values that are computed from the values of other members. These functions would have no input, I guess, so I gave them none. I...
c++ strings help!
Homework Statement
Create a C++ program that would ask the user for a username and password. Password field should be masked. If the user exceeded three errors, a string will be seen on the screen which says “ERROR” and exits the program.
username: ayen_lee...
i have a txt file full of numbers and i just want to take the first 5 digits, save it has one number, shift over 1 digit, take another 5 digits, save it, and so on until the end of the file
here is the code
fstream Prime;
Prime.open("digitsofe.txt");
if (!Prime.is_open()) { cout <<...
C++ program--help printing columns and rows
Homework Statement
Print the approx of e^x from 1 to 100. It might not fit on screen so for example print out in 10 columns and 10 rows.Homework Equations
int row =1;
while (row < 20)
{
int column = 1...
Hi everybody. I'm relatively new to C++ and am having an issue. What I need to do is take in several files and then do some data processing in each of them separately. I've tried to do this several ways and nothing has worked so far. Below is my last attempt.
Basically, each file is...
I just thought I'd post this here. It will help you solve a matrix by getting it into row-echelon form (well, close to it anyway). I avoided global variables and tried to make it as expandable as possible.
#include <iostream>
using namespace std;
void output(int height, int width, long...
I'm attempting to teach myself C++, and I came across this old C++ problem in my closet. It's a ripped page and I'm not sure what book it's from so it has no solution. It's easy, but I seem to have issues with while loops. If someone would explain the logic or show me an example as to how they...
Hi Everyone!
Does anyone here know where i could find a good C++ programming tutorial. I've always wanted to learn how to progam but i can't find a good tutorial (im only 13 years old..) if anyone knows about a good tutorial please post link here, pm me the link, or email me the link.
Much...
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
this would produce an output in the console and then closes it automatically its so fast I can't even see it, I know you can let the console display the output show and close only when you...
i have made programs on my TI83+ than i bought a TI89+ Titanium but i have never programed in C++ or any other programming language. so could anyone tell me about how to program in C++ and the key differences between C++ and TI basic? if anyone wnats my programs contact me with youe E-mail and i...
Is there a way I can write characters or numbers anywhere on the screen in C++ like the ones used in pascal like gotoxy where I simply write screen coordinates as x & y.
I want to graph curves in C++. I can program them in, find the x,y,z coordinates, but I don't know how to graph them. I am using Dev C++. How would I go about graphing them? Is there some predefined graphics library that I can use or is it more complicated than that?
Im sure this is a very basic question. Anyways I need to test the input going to my c++ program before cin stores it. (ive basically written a very simple 4 function calculator program and i just want to make sure that my program does not fail if someone were to enter for example a letter...
c++ data structures! please help!
i want to write a c++ program that implements a binary search tree from an infix expression. the program should perform the following:
-the expression should be saved and read from a file.
-use a stack to check if the expression is well formed in terms of...
Hi there,
sometimes ago I was browsing a Nuclear Eng. Dept. website ( I can't remember what university) and ran into a project in which somebody had converted the WIMS source code from Fortran to Object Oriented C++.
Now I'm looking for a such conversion. Can anybody help me?
So I have this Class Random that needs to have a friend function sort which needs to exist in two namespaces.
Class Random
{
... Some stuff
friend void sort(Random &x);
}
namespace ascending
{
void sord(Random &x)
{
... Some Stuff
}
}...
I'm having trouble figuring out why some of my integers are behaving crazy.
I have a vector of vectors, declared as
vector<vector<int> > ph;
In another function, I add a vector of three ints to it using
vector<int> p;
p.push_back(0); p.push_back(0); p.push_back(1);
ph.push_back(p)...
im not too sure if this belongs here or not but i figure ill give it a shot.
Im not too bad at solving things myself, i could do this problem without C++(though it would take some time). Unfortunately, i need to use C++.
Rather than try to explain what i need help with ill copy and paste...
I'm taking an undergrad CS course, and we've been split up into teams and have been assigned a tetris game in C++. The limitations are very loose, and we can basically do it however we want. I've had 2 C++ classes and a class in Java, so I'm not that new to programming, but I am new to...
Homework Statement
If I write:
char* Name="Computer";
cout<<Name[0]; //Output: C
cout<<Name[2]; // Output: M
what do the above lines mean? How can a pointer store a string? And why is it acting like an array? Either it is a simple concept that I have forgotten or it is a new concept...
Hi
Lets see...I got this interesting program: To Find the smallest number which when put together with its square as a single number has the digits 1-9 exactly once i.e. it does not have a 0 in it.
Initial Observations:
1.The first thing to see is that the conglomerated no. should have...
I recently bought the C++ Training Guide by Steve Heller and the CD is broken. Does anyone who owns this book know whether it's necessary because for a newbie like myself I'm finding it slightly difficult to understand some of the basics.
Also, I've been using cmd (and notepad) to teach...
I don't know much of programming but i know a few things...so please be gentle on me o:)
I need help (in C++) with separating the diggits of a number without using any divisions (no '%10', no '/10', etc), just something that reads the number and gives me the diggits. don't know if it helps but...
Hi!
I want to learn C++. I know some java..
I was wondering what kind of software i need to do C++ on my computer, I have Windows vista premium.
Does it exists software equvalent to BlueJ to C++ ?
Сайн байна уу? Хэрвээ энд манай Монголчууд ордог бол. хэ хэ
Та нар энд C++ дээр хийсэн жижиг сажиг тоглоомынхоо соорсыг энд тавьж болно шүү!
Hello all.
Lets putting here you c++ game source!
sorry my bad english!
Im trying to find the maximum cycle length, but the program hangs when i>100000 or so. Here's the code:
#include<iostream>
using namespace std;
int main()
{
unsigned int i, j;
int count, cmax;
int process(int x);
cout<<"Enter range:\nFrom: ";
cin>>i...
Homework Statement
I have my computer science exam today (in 2 hours). I want to know how to declare and initialize a const member in a class.
The Attempt at a Solution
I tried this:
_________________________________________________________________
class stu
{
const int a=10...
1. 1. Use a do…while loop to determine the total number of numbers between 0 and 500 that are evenly divisible by 5 or 7.
Output should look like this:
The total number of numbers less than 500 that are divisible by either 5 or 7 is 157.
Use at least 1 increment operator and 1 decrement...
Hello,
I am attempting to create a program that will evaluate the Bateman equation for radiactive decay series, given several decay constants stored in a text file. I am not sure where this is going wrong, but no matter what chain member I enter in as the desired nuclide to find the mass...
I want to do this (HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
if ( hConsole != INVALID_HANDLE_VALUE )
{
// do stuff...
...
}
) In visual c++, I generally use gotoxy() to position the http://www.seopromolinks.com/business_continuityplan.asp"...
Hi Everyone I have a object oriented C++ assignment which is due this week and I have no idea as to how start it....
This program prints a motion verb ( fly, run, swim, crawl, walk, or roll ), waits for a second,
then prints the name of an entity and repeats the verb (for example: fly ..1s...
Hello,
For my summer project I am going to be writing some C++ code. My computer is a Mac running OS X. I really don't know where to start. I have programmed Java on my Mac previously without too many problems, although I was struggling with setting up XCode. Now with C++, which seems much...
I was wondering if anyone had a .pdf or any other type of file that could serve as a guide to C++. I just started and would like to learn the program so I do not have to constantly look things up. If not, could anyone suggest a good book that covers the basics/intermediate parts of C++...
hi
I am having trouble doing this assignment. I have very little knowledge of c++ and the truth is i don't even know where to begin. Can someone please help me with it. the program I am supposed to be writing is as follows:
compute the height of a projectile that was launched.
You will...
Homework Statement
I am working on a program that reads in names (strings), sorts them, and then later is searchable. The problem I am having is this. When I enter the first 20 elements of the array, everything works fine. When I enter the 21 element (when it goes into the if loop) I get...
hey. i want to graph a projectile motion. i got the code of a sine wave but the x and y axis' are in the opposite sides. i want the curve to look like a projectile with the curve facing down. thanx. here's my code
#include <iostream.h>
#include <iomanip.h>
#include <math.h>
#include...
I want to build a binary matrix (with 1 and 0 entries) with all possible combinations, say for example if n is the number of entries of one row of the matrix, then 2^n is the total number of different entries in the matrix.
For instance, for n=3, 2^n = 8, so we would have the following matrix...
Im having a problem with a cpp program. It gives me 6 linker errors, which have something to do with buffer overflows. I used borland turbo cpp 3 to compile this. What should I do. Here's the code:
#include<fstream.h>
#include<conio.h>
#include<stdio.h>
ofstream write;
ifstream...
Hey. i am having a problem graphing a projectile motion into C++. At the moment I am using the program Microsoft Visual C++ at uni. i got a problem here that i can't even start to solve. Well the problem asks me to to ask the user to enter the intial velocity and the angle at which the...
I know that C++ is based on C, but I recently checked out the book https://www.amazon.com/dp/1565923065/?tag=pfamazon01-20, thinking it was a C book but now I am unsure and can hardly tell the difference between the two.
Can someone help clarify what the differences are? which do you...
void PrintTranscript( const vector <student>& a )
{
cout << "Here is a list of courses that you have taken:" << endl;
for (int i = 0; i<a.size(); i++)
{
line 104: for (int j = 0; j<a.size(); j++)
cout << a[i].firstname << " " << a[i].lastname << "...
1. The problem I am having is that I am trying to pass a two dimensional array from my main function to a secondary function. I know it has to be call by reference and using the name of the matrix, "matrix" in my case should send the location. Also since it has more than one dimension there...