C++ Definition and 803 Threads
-
C
C/C++ Do C++ Compilers Repeatedly Process the Same Header Files?
Is it true that most, if not all, C++ compilers tend to compile the same .h files over and over again? Say there are two .cpp files that include the same .h file, and the compiler processes one of these .cpp files & all its included header files as well. Once it gets to the second .cpp file, it...- Chromium
- Thread
- C++
- Replies: 3
- Forum: Programming and Computer Science
-
S
Comp Sci Write C++ Program: Create Binary Sequences of Length 15
Write a C++ program that writes all binary sequences of length 15 Guys i have totally no idea how to go about doing this. Can anyone tell me how i should go about doing this?- semc
- Thread
- C++
- Replies: 12
- Forum: Engineering and Comp Sci Homework Help
-
W
C/C++ How Can Operator Overloading for Multiple Arguments Be Fixed in C++?
I've got an overloaded operator + newtype X, Y, Z, W;W = X + Y; // works fine W = Y + X; // works fine // but with more arguments I'm getting compiler error // saying there is no match for operator+ W = X + Y + Z; Sample code newtype operator+(newtype &A, newtype &B) { newtype C...- waht
- Thread
- C++ Operator
- Replies: 5
- Forum: Programming and Computer Science
-
E
Comp Sci C++ Program - Area of a Quadrilateral
(Reminder: This is a 2nd week problem for school. First C++ programming class. very limited input/output knowledge at this point.) Homework Statement (paraphrased) Have user input 4 ordered pairs of coordinates that go around the quadrilateral in either the CW or CCW direction. Output the...- exitwound
- Thread
- Area C++ Program
- Replies: 9
- Forum: Engineering and Comp Sci Homework Help
-
E
Comp Sci How to Handle Decimal Precision in C++ for BMI Calculations?
This is our very first assignment in C++, from the very first week of class so we don't know a whole lot yet. Keep that in mind. Homework Statement Write a program that will: -input someone's height in feet and inches -output that person's height in centimeters -output the weight in...- exitwound
- Thread
- Assignment C++
- Replies: 11
- Forum: Engineering and Comp Sci Homework Help
-
C/C++ Creating C++ .dll File for Use with C# - Error: "regsvr32.exe Cannot be Found
Hello all, I am using C++ 2008 Express edition to create a .dll file for use in C# and I am receiving the following error from my compilier. "regsvr32.exe cannot be found" I have all of the properities set correctly for the .dll creation and the .def file is specified correctly. Does...- CFDFEAGURU
- Thread
- C++ Creation File
- Replies: 2
- Forum: Programming and Computer Science
-
C/C++ C# with C++ Functions - Learn How to Link Together
Hello all, All of my C++ programming experience is in the coding of console applications and I have recently been asked to re-code some of my console applications as windows forms applications. I asked two highly experienced programmers (one a physicist and the other a financial/business...- CFDFEAGURU
- Thread
- C++ Functions
- Replies: 2
- Forum: Programming and Computer Science
-
K
Comp Sci Accelerated C++ book - no solutions for exercises, should I still solve them?
As the title says, there are no answers for the book I'm learning C++ from, should I ignore the exercise section (well except the first exercise which is always compile and execute chapter examples) and move on or give them a try? I can get my hands on many exercises with solutions, but I'd like...- KCL
- Thread
- Book C++ Exercises
- Replies: 22
- Forum: Engineering and Comp Sci Homework Help
-
C/C++ In line vs. In function produces different results in C++
Hi, I'm working on a code where essentially I have two very large arrays q and b and I have this function Hamiltonian(double * v1, double * v2) which takes the points of two arrays and does all sorts of things with them. Anyways. If I write my code using Hamiltonian(q,b) my code runs FASTER...- maverick_starstrider
- Thread
- C++ Function Line
- Replies: 16
- Forum: Programming and Computer Science
-
S
MATLAB Matlab to C++: Accessing a 1228x681 Matrix
Hi, I have a mat file, which is a 1228 x 681 matrix and I want to access this file in c++. Can anyone help me how to do this?- schabbir
- Thread
- C++ Matlab
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
R
C/C++ C++ IDE - Eclipse vs. Visual C++
I've become fairly proficient in C (relatively speaking) and want to start learning C++. However, I can't for the life of me get it working with Eclipse. I keep getting errors saying it can't find iostream, even though minGW works perfectly when compiling C. My brother recommended Visual C++...- rafehi
- Thread
- C++ Eclipse Visual
- Replies: 4
- Forum: Programming and Computer Science
-
R
C/C++ Learning c++ text makes my brain die
I've been working on learning c++ pre-emptive to going to college. I've found that I've come to learn it really well off of youtube videos. Unfortunatly there is no youtube series spanning the variety of fields in c++ that i need to learn. I read too fast and find myself reading right into...- Rhine720
- Thread
- Brain C++ Text
- Replies: 13
- Forum: Programming and Computer Science
-
A
C/C++ C++ Operator Classes: Real & Imaginary Numbers Explained
i don't clearly understand that what are the real and imaginary numbers in c++ classes when defining operators. help me . thnx- asma_MIT
- Thread
- C++ Classes Operator
- Replies: 9
- Forum: Programming and Computer Science
-
H
C/C++ C++ Chatterbot: Fix Linking Errors with Dev C++ 5
Hello everybody! I found this code on the net. It seems to have worked for everybody except for me. Most of the errors say there is some linking error. I am using dev c++ 5. I would like to know if the problem is with my compiler or the program. You can download it on...- hermy
- Thread
- C++
- Replies: 2
- Forum: Programming and Computer Science
-
E
C/C++ Borland C++ 5.0 input using arrow keys
hi! I've started making my own games in Borland C++ 5.0 I want to learn how to detect the user's input of arrow keys (for eg. when a user presses UP,DOWN ,RIGHT or LEFT) Can somebody please post a short tutorial on detecting arrow keys? Thank You Ephysics PS- Is this correct ? int c =...- Ephysics
- Thread
- C++ Input
- Replies: 3
- Forum: Programming and Computer Science
-
K
C/C++ Compilation of a header file in c++
Hi..am just learning c++...i have a doubt.. Suppose you have a header file and you include it in your main program by using the #include directive..then do you have to compile the header file separately? Or does it get compiled with the main program?- krishna mohan
- Thread
- C++ File
- Replies: 3
- Forum: Programming and Computer Science
-
H
C/C++ Solve Sudoku in C++ with Algorithm.h
You do NOT have to read the entire code to help me. :smile: It's just for your reference. The problem: I keep getting the message that the file 'algorithm.h' can not be opened. But the header file is very much present in the include folder. What do i do? The compiler I'm using is tubo...- hermy
- Thread
- C++ Sudoku
- Replies: 7
- Forum: Programming and Computer Science
-
S
C/C++ Struggling with C++ Code for Sudoku Puzzle
Please help in c++ urgent Argh! I've been trying to work out this problem for an entire week and I'm now at my wits end! I'm supposed to hand in this assignment in 7 hours and am posting my problem here as a last resort. Can i please have someone's assistance in this? I use Dev-C++. Basically...- steelband
- Thread
- C++ Code Puzzle Sudoku
- Replies: 6
- Forum: Programming and Computer Science
-
D
C/C++ How to distribute molecules to states using C++
I don't know how to distribute large amount of molecules(say a million) to many ro-vibrational states(say 100 states), according to the relative population of these states. As is very important when I want to simulate numerically the classical trajectory of these molecules in a spatially...- dilatoryyang
- Thread
- C++ Molecules States
- Replies: 1
- Forum: Programming and Computer Science
-
P
C/C++ How can I incorporate graphics into my C++ code?
How can I use graphics in my C++ code? I'm making a project of basic level (cricket score board) and I need to incorporate graphics in it. Are there any online tutorials etc. for graphics? P.S. I use Visual C++ 6.0 compiler.- Peon666
- Thread
- C++ Code Graphics
- Replies: 16
- Forum: Programming and Computer Science
-
U
C/C++ Coding Gauss Jordan Elimination in C++ - Need Help with Swapping Rows
Hello all. I am designing a Gauss jordan elimination program using c++. I need a little help to code this as I am not too familiar with arrays and the operations you can perform on them. The first question I have is how would I swap rows? I know its probably really simple but I cannot find...- ur5pointos2sl
- Thread
- C++ Coding Elimination Gauss
- Replies: 14
- Forum: Programming and Computer Science
-
S
C/C++ Find Nearest Record in Binary Search Tree | C++ Implementation
Hi everyone, i have a binary search tree proble, please help me.. * Find record with key x in the tree. If not found, return the two nearest records in the tree (in alphabetical order) * Return values: * FOUND: Return the address of the node in the tree which contains key x, set n1 =...- skyhyyzlz
- Thread
- Binary C++ Search Tree
- Replies: 1
- Forum: Programming and Computer Science
-
N
Comp Sci How can C++ be used to solve various programming problems?
PLZZZZZ HELP ME I am crying I have a test but, I don't know how to solve this problems PLEASSSSSSSSE HELP Problem#1: Write user-defined function to take a depth (in kilometers) inside the Earth as input data; compute and print the temperature at this depth in degree Celsius and degree...- Norah
- Thread
- C++
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
J
Questions on Calc II, Physics, and C++
Hello thar everyone! I was just curious about three things. -At the moment I'm taking a 3 credit Calc. class and haven't had trouble with it. I'm interested in jumping into a 4 credit Calc II next semester; is this possible to do? -Also, I'm taking College Physics and I have done well so...- Jammin_James
- Thread
- C++ Physics
- Replies: 2
- Forum: STEM Academic Advising
-
A
Comp Sci C++ Program: Write a Program to Read Paragraphs
Write a program that reads a paragraph of 4 lines of text. The user can enter extra spaces between words. The length of each line does not exceed 50 characters. The program should output the following: ((Use pointers)) 1. A table indicating the occurrence of each letter of the alphabet in the...- abedhamayl
- Thread
- C++
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
F
Comp Sci How Can I Modify a C++ BST Implementation to Check for Duplicate Values?
Homework Statement I am working on an assignment in which I have to add a method to my BST class which checks if a binary tree object is in fact a Binary Search tree. So (1) A left child must be smaller than the parent (2) A right child must be larger than the...- FMAfan
- Thread
- Binary C++ Search Tree
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
M
C/C++ Help with a c++ program that converts numbers 1 to 1000
I have tried to come up with the code below so i want to improve it so tha it converts numbers 1 to 1000 to romans.. help out! #include <iostream> using namespace std; int main() { int n; n >=1; cout<< "please enter an interger number:" <<endl; cin >> n...- mulabisc
- Thread
- C++ Numbers Program
- Replies: 1
- Forum: Programming and Computer Science
-
M
C/C++ Help with a c++ program that converts numbers 1 t0 1000
#include <iostream> using namespace std; int main() { int n; n >=1; cout<< "please enter an interger number:" <<endl; cin >> n; if(n == 9) cout << "IX"; else if(n >=5 && n<=8) cout << "V"; else if (n == 4)...- mulabisc
- Thread
- C++ Numbers Program
- Replies: 3
- Forum: Programming and Computer Science
-
C/C++ Help with Simple C++ code please
Help with Simple C++ code please :) So here is the idea of the program (I have comments in the code too) Ask the user for a number up to 5 digits long, store it in a as a string array,reverse the order of the number (i.e. if user enters 12345 make it 54321), convert the reversed string to an...- Saladsamurai
- Thread
- C++ Code
- Replies: 20
- Forum: Programming and Computer Science
-
C/C++ C++ Programmer Defined Factorial Function
Hi I am relatively new to C++ and I am having a little trouble understanding, in detail, the logic of this recursive function. Can someone tell me if my reasoning this out is correct? int fact (int n) { if (n==1) return 1; else return (n*fact(n-1)); } So if the...- Saladsamurai
- Thread
- C++ Factorial Function
- Replies: 15
- Forum: Programming and Computer Science
-
J
C/C++ C++ How do I call a specific line from an input file?
Alright, so my current class assignment is to create a program that will read several accounts, whether or not its a savings, the amount in the acocunt, then make calculations for interest and fines based on that info. The setup for the input file is like this: account checking/savings amount...- jimmyv12
- Thread
- C++ File Input Line Specific
- Replies: 5
- Forum: Programming and Computer Science
-
D
C/C++ File Processing via seekp and seekg C++
Hello, I am working on a program about credit card that basically, generate 16 ramdom digits, a starting balance and write it to a file. The file works as an database and can be updated later. Here is my credit card class class CCard { // variables section private: //sixteen digits of a...- duydaniel
- Thread
- C++ File Processing
- Replies: 9
- Forum: Programming and Computer Science
-
J
Comp Sci Efficient C++ Data Read/Write Program for Employee Pay Increase Calculation
Alright, so basicly I'm writing a program that will copy three people's first and last name, current pay, and pay increase %. Then, write it to a file that gives their name, and new pay after the increase has been applied to the current pay. When I launch the program, then open the output file...- jimmyv12
- Thread
- C++ Data
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
S
C/C++ Calculate Jacket Size with Height, Weight, and Age | C++ Loop Tutorial
Hey guys it my first post, so please be nice :). So I am doing a problem right now and I can decide how to go about it... I am kinda lost right now, I could use an If/Else statement but it would take along time so I decided to use a loop, so here is the problem. Program asks user to enter...- Streitsky
- Thread
- C++ Loop
- Replies: 2
- Forum: Programming and Computer Science
-
N
Jumpstarting Your Programming Career: Tips from a City College CS Student
im doing course work in city college in computer science and would like to know the best way to get my foot in the door in the programming industry at this point i have completed both cs1 and cs2.- nameVoid
- Thread
- C++
- Replies: 3
- Forum: STEM Career Guidance
-
C/C++ C++ Compiler for Mac Leopard that is NOT Xcode?
I am a novice (very novice) C++ user. I use Dev C++ on my PC. I really love it because it is very clean and simple. I just click File->new->new source code and I am there. There is an editing window and a building workspace is opened automatically. Is there something comparable to Dev C++...- Saladsamurai
- Thread
- C++ Compiler Mac
- Replies: 13
- Forum: Programming and Computer Science
-
P
C/C++ C++ Nested Classes: Advantages & Disadvantages
C++ -- Nested Classes A post or two I have been working with appeared to be associated with students in a C computer language programming course. In other words, the class may have not been object oriented. Also, mentioned in one post was the concept of housekeeping being less important than...- Potential
- Thread
- C++ Classes
- Replies: 3
- Forum: Programming and Computer Science
-
M
C/C++ Reading currents and controlling voltages in c++
Hi all -- I'm writing a controller for an interferometer and I need to be able to control the voltage across a terminal and read the current from a photodiode in c++. What would be a good, reasonably priced peripheral that would accomplish this, preferably with linux support? Better yet, is...- Mr_Grieves
- Thread
- C++ Currents Reading
- Replies: 3
- Forum: Programming and Computer Science
-
P
Debugging a C++ Program to Replace Strings
Homework Statement Ok, i need to make a program that will search for a substring in a given string, and replace it with another one.The Attempt at a Solution #include<stdio.h> #include<iostream> #include<string.h> using namespace std;int fsubstitute(char *ulazni, char *prvi, char *drugi)...- Petkovsky
- Thread
- C++ Debugging Program Strings
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
C/C++ Troubleshooting a Simple C++ if/else Question for New Programmers
What is wrong with mine? I am super new to programming and am trying to figure this stuff out on my own. The stuff in the tutorial is even too advanced for me. Here it is: I am sure it is really easy to see, but I do not understand the error :confused:- Saladsamurai
- Thread
- C++
- Replies: 2
- Forum: Programming and Computer Science
-
C/C++ C++ compiler needed (free is nice
C++ compiler needed (free is nice:) So I am taking a very basic (no pun) programming course at my university. We are working in C++ for now and we use Microsoft Visual Basic C++ 6.0 (or something to that effect). I live waayyy off campus, so I would like to be able to work at home if...- Saladsamurai
- Thread
- C++ Compiler
- Replies: 20
- Forum: Programming and Computer Science
-
K
Comp Sci Which Language Handles Thread Operations Better for File Manipulation?
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, can somebody write this program: Create 5 threads which share a file and let "even" threads write to a file, and let "odd" delete...- kings1703
- Thread
- C++ Java Threads
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
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...- kings1703
- Thread
- C++ Java Threads
- Replies: 2
- Forum: Programming and Computer Science
-
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...- SimonasV
- Thread
- Algorithm C++ Writing
- Replies: 4
- Forum: Programming and Computer Science
-
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...- robousy
- Thread
- C++ Tutorials
- Replies: 4
- Forum: Programming and Computer Science
-
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...- Naldo6
- Thread
- Arrays C++
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
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...- Naldo6
- Thread
- Arrays C++ Program
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
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...- Freyster98
- Thread
- C++
- Replies: 5
- Forum: Programming and Computer Science
-
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...- NeoDevin
- Thread
- C++ Matrix
- Replies: 8
- Forum: Programming and Computer Science
-
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...- Naldo6
- Thread
- C++ Pyramid
- Replies: 14
- Forum: Engineering and Comp Sci Homework Help