C++ Definition and 803 Threads
-
L
C/C++ Solve C++ Program Issue: Compute Square Root & Compare Difference >50
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...- Lykin
- Thread
- C++ Program
- Replies: 4
- Forum: Programming and Computer Science
-
N
C/C++ C++ GUI: Find a Good Website for Help
Hey can anyone direct me to a good website??- NoobixCube
- Thread
- C++
- Replies: 9
- Forum: Programming and Computer Science
-
Z
C/C++ C++ Tutorial for Beginners: Learn Programming with Zeeshan
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...- zeeshawn
- Thread
- Beginners C++ Programming Tutorial
- Replies: 7
- Forum: Programming and Computer Science
-
C
C/C++ C++ Console Help: Show Output and Close on Enter Key
#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...- chrisalviola
- Thread
- C++
- Replies: 9
- Forum: Programming and Computer Science
-
T
C/C++ Learning C++ Programming for TI Basic Users
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...- thharrimw
- Thread
- C++ C++ programming Programming
- Replies: 4
- Forum: Programming and Computer Science
-
C
C/C++ Using Gotoxy in C++ for Positioning Characters on Screen
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.- chrisalviola
- Thread
- C++
- Replies: 7
- Forum: Programming and Computer Science
-
C
C/C++ Graphing Curves in C++ w/ Dev C++
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?- chaoseverlasting
- Thread
- C++ Curves Graphing
- Replies: 24
- Forum: Programming and Computer Science
-
F
C/C++ How to test input type before storing C++
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...- foges
- Thread
- C++ Input Test Type
- Replies: 7
- Forum: Programming and Computer Science
-
K
C/C++ Finding the Right C++ Compiler Program
Could anyone recommend a good C++ compiler program. I'd rather get a recommendation than choose from the myriad on the net. Thanks :smile:- Kurdt
- Thread
- C++ Compiler Program
- Replies: 24
- Forum: Programming and Computer Science
-
V
Comp Sci C++ Binary Search Tree: Infix Exp. & Tree Traversal
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...- veron
- Thread
- C++ Data Structures
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
L
C/C++ C++ Version of WIMS: Find Help Here
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?- libertad
- Thread
- C++
- Replies: 2
- Forum: Programming and Computer Science
-
S
C/C++ Namespace friend functions C++
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 } }...- shwanky
- Thread
- C++ Functions
- Replies: 1
- Forum: Programming and Computer Science
-
N
C/C++ C++ vector<vector<int> > problem
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)...- NeoDevin
- Thread
- C++
- Replies: 4
- Forum: Programming and Computer Science
-
K
C/C++ C++ Program Help: Get Sum of N Numbers w/ Pointers
What is the program code in c++ to get the sum of given n numbers using pointers?- k_phanichandra
- Thread
- C++ Program
- Replies: 2
- Forum: Programming and Computer Science
-
P
C/C++ How can I tackle building a tetris game in C++ with my team?
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...- prelic
- Thread
- C++
- Replies: 2
- Forum: Programming and Computer Science
-
M
Comp Sci C++ storing a string in a pointer.
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...- Mr Virtual
- Thread
- C++ String
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
R
C/C++ Solve C++ Number Probs: Find the Smallest Number with 1-9 Digits
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...- ron_jay
- Thread
- C++
- Replies: 4
- Forum: Programming and Computer Science
-
T
C/C++ C++ Training Guide by Steve Heller
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...- tommyburgey
- Thread
- C++
- Replies: 1
- Forum: Programming and Computer Science
-
S
C/C++ C++ Separate Digits: No Division Needed
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...- Skainstein
- Thread
- C++
- Replies: 22
- Forum: Programming and Computer Science
-
C/C++ Learning C++ - What Software do I Need?
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++ ?- malawi_glenn
- Thread
- C++ Software
- Replies: 5
- Forum: Programming and Computer Science
-
S
C/C++ C++ Game Source: Mongolians Welcome!
Сайн байна уу? Хэрвээ энд манай Монголчууд ордог бол. хэ хэ Та нар энд C++ дээр хийсэн жижиг сажиг тоглоомынхоо соорсыг энд тавьж болно шүү! Hello all. Lets putting here you c++ game source! sorry my bad english!- sharavsambuu
- Thread
- C++ Game Source
- Replies: 3
- Forum: Programming and Computer Science
-
C
Comp Sci Solving C++ 3n+1 Problem - Max Cycle Length w/ Code
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...- chaoseverlasting
- Thread
- C++
- Replies: 12
- Forum: Engineering and Comp Sci Homework Help
-
M
Comp Sci C++ How to declare/initialize a constant in a class?
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...- Mr Virtual
- Thread
- C++ Class Constant
- Replies: 25
- Forum: Engineering and Comp Sci Homework Help
-
Z
Comp Sci Solving C++ Problems: Finding Numbers Divisible by 5 or 7
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...- ZincPony
- Thread
- C++
- Replies: 11
- Forum: Engineering and Comp Sci Homework Help
-
Z
Comp Sci How to Solve a Computer Science C++ Problem?
Problem Solved thank you- ZincPony
- Thread
- C++ Computer Computer science Science
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
L
C/C++ Why is My C++ Program for the Bateman Equation Returning NAN?
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...- lapo3399
- Thread
- C++
- Replies: 5
- Forum: Programming and Computer Science
-
J
C/C++ Positioning Cursor in Visual C++ Console Program - Help Needed
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"...- jerkjames
- Thread
- C++ Program Visual
- Replies: 1
- Forum: Programming and Computer Science
-
N
C/C++ C++ Object-Oriented Assignment: Test Your Motion Knowledge
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...- nemisis
- Thread
- Assignment C++ Knowledge Motion Test
- Replies: 7
- Forum: Programming and Computer Science
-
C
C/C++ How do I set up C++ on my Mac for beginners?
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...- colin.mcenroe
- Thread
- Beginners C++ Mac
- Replies: 12
- Forum: Programming and Computer Science
-
S
C/C++ Finding a Guide to Learning C++
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++...- Stevedye56
- Thread
- C++
- Replies: 2
- Forum: Programming and Computer Science
-
R
C/C++ How to Simulate Projectile Motion in 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...- riza
- Thread
- Assignment C++ Projectile
- Replies: 2
- Forum: Programming and Computer Science
-
P
Comp Sci Trouble Expanding an Array of pointers in C++
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...- punx
- Thread
- Array C++ Pointers
- Replies: 15
- Forum: Engineering and Comp Sci Homework Help
-
B
C/C++ How Can I Adjust My C++ Sine Wave Code to Simulate Projectile Motion?
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...- Badboy
- Thread
- C++ Graphing
- Replies: 1
- Forum: Programming and Computer Science
-
J
C/C++ Creating a Binary Matrix with C++ Code
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...- jetoso
- Thread
- Binary C++ Code Matrix
- Replies: 1
- Forum: Programming and Computer Science
-
C
C/C++ Fixing C++ File Program with 6 Linker Errors
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...- chaoseverlasting
- Thread
- C++ File Program
- Replies: 20
- Forum: Programming and Computer Science
-
B
Comp Sci Having Problem Graphing a projectile motion into C++
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...- Badboy
- Thread
- C++ Graphing Motion Projectile Projectile motion
- Replies: 7
- Forum: Engineering and Comp Sci Homework Help
-
K
C/C++ I know that C++ is based on C, but what are the differences?
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...- Ki Man
- Thread
- C++
- Replies: 10
- Forum: Programming and Computer Science
-
S
Why Doesn't My Win32 Pendulum Simulation Oscillate?
Homework Statement Simple Pendulum using Forces (Computer Simulation) Max theata = PI / 6 Force Of Gravity is { 0, 10 } Force_Tension.x = - 10 * sin(balls.theata); Force_Tension.y = - 10 * cos(balls.theata); Homework Equations accelleration = Force_Tension -...- stringa
- Thread
- C++ Physics Simulation
- Replies: 1
- Forum: Advanced Physics Homework Help
-
N
C/C++ C++ program starting with void PrintTranscript
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 << "...- Nusc
- Thread
- C++ Program
- Replies: 21
- Forum: Programming and Computer Science
-
G
C/C++ How can I pass a 2D array in C++ without errors?
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...- giritrobbins
- Thread
- 2d Array C++
- Replies: 8
- Forum: Programming and Computer Science
-
N
C/C++ C++: Open File Multiple Times Before Exiting
Hi. I am required to ask the user to open a file multiple times before exiting the program. How do I do this? void ReadData(vector <student> & section, int& num_Students,string& filename) { ifstream in; cout << "Please enter file name:" << endl; cin >> filename...- Nusc
- Thread
- C++ File
- Replies: 3
- Forum: Programming and Computer Science
-
M
Comp Sci Why Does My C++ For Loop Increment Erratically?
I wrote a program that is supposed to find the standard deviation of a set, but something really strange happens in a for loop that I have in my main function. int main() { int i=1; int NUMBER_OF_ELEMENTS; double data[NUMBER_OF_ELEMENTS]; cout << "Please enter the number of...- Mindscrape
- Thread
- C++ deviation Program Standard Standard deviation
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
G
Comp Sci Efficient C++ Homework Help: Troubleshooting Infile Command Issues
Homework Statement Well I have to read in data from a text file test some conditions on certain columns and count up the failures. I am having a problem with the infile command, I have tried using infile.close(); but it does not seem to reset it. while(infile>>y) { for(i;i<=(j/4);i++)...- giritrobbins
- Thread
- C++ Homework
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
M
Comp Sci C++ Image transformation (function help really)
Homework Statement I'm making a program in C++ to take an image in .ppm format and either create its inverse or binary threshold. 2. The attempt at a solution #include <iostream> #include <fstream> #include <cmath> #include <cstdlib> //for exit() #include <string> #include...- mkienbau
- Thread
- C++ Image Transformation
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
C/C++ Solving a C++ Problem: Sorting Last Names in Alphabetical Order
[SOLVED] C++ problem I'm trying to make a structure of 4 elements to store an array of items. I'm trying to sort the lastName element in alphabetical, ascending order, but I keep getting errors around the last for loop. Can someone tell me what I'm doing wrong? #include "stdafx.h"...- z-component
- Thread
- C++ Sorting
- Replies: 4
- Forum: Programming and Computer Science
-
A
C/C++ Need Help Downloading Free C++ Programming Software
hello everone there, sorry to bother you just wanted to ask, if anyone could help me where to download free c++ programming software. please please let me knw if anyone know it i will be very apriciated for that. u can reaply me on this add: talk2amit_rulz@hotmail.com thank you for ur time- amitpraut
- Thread
- C++ C++ programming Programming Software
- Replies: 7
- Forum: Programming and Computer Science
-
P
Comp Sci Creating and Printing Employee Data - C++ Homework Solution
Since I don't know how to use the code on physics forums, I'll just type the problem I'm working on I'm supposed to write a program with the class Employee that makes two employees; sets their age, yearsOfService, and Salary; and prints their values # include <iostream> using namespace...- proton
- Thread
- C++ Homework
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
Comp Sci Learn to Create a C++ Word Ladder Program: Step-by-Step Guide
Hi, I'm working on a word ladder program outlined here: http://www.pic.ucla.edu/~nathan/cgi-bin/moin.cgi/la4 To get started, I am just trying to read words from a file and put them into a vector of "node"s (a struct we were given to use). So far I've only been able to read in each word...- Math Is Hard
- Thread
- C++ Program
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
C/C++ Compiling C++ Remotely with SSH on Windows XP
I would like to use SSH to compile my C++ files remotely in my school's lab. I have never done this before, but I understand that I need an SSH client. So I looked at these: http://www.openssh.com/windows.html I am on Windows XP. Is there one you would recommend? thanks.- Math Is Hard
- Thread
- C++ Windows
- Replies: 2
- Forum: Programming and Computer Science
-
M
Comp Sci How to Correctly Implement a 2D Array with Random Values in C++?
Homework Statement 1. Create a 2D array, A[10][10], of 100 integers. 2. Ask the user for two integers R and C where 0 < R ( 10 and 0 < C ( 10. 3. Using nested loops, fill every element A[i][j] (where 0 ( i < R and 0 ( j < C) with random numbers ranging in [0, 200]. I will describe how to...- mkienbau
- Thread
- Arrays C++
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help