C++ Definition and 803 Threads
-
C/C++ C++ header files with and without h extension
c++ header files with and without "h" extension hi fine people,:wink: i have seen some people use header files with ".h" extension and some without it. what is reason? i think there are some header files where you are required to use ".h" such as "#include <windows.h>. you can not use...- PainterGuy
- Thread
- C++ Extension files
- Replies: 7
- Forum: Programming and Computer Science
-
C/C++ Difference Between C++ and C++ Standard
hello everyone,:wink: i was reading somewhere that there is C++ and C++ Standard. could some please tell me the main difference between two? and i also read something that some things such as "getch()" are non standard. can you guide me a bit on this? i will really appreciate this help of...- PainterGuy
- Thread
- C++ Standard
- Replies: 3
- Forum: Programming and Computer Science
-
S
C/C++ Why are my mesh points changing in my 1D linear convection C++ program?
I'm learning c++ and currently trying to write a little programme for 1D linear convection (wave equation). I have managed set all boundary and initial conditions as well as a mesh. But I have reached the point where I can't understand why the program does what it does. In red I...- ssatonreb
- Thread
- 1d C++ Convection Linear
- Replies: 5
- Forum: Programming and Computer Science
-
C/C++ What make Mac OS more safe if C++ is
hello nice people, it was read by me that both ms windows and apple os has been made using basicaly c++. some days in past on a some antivirus article it came to my attention apple os is safe from virus than windows. if both use same kind of bricks they why bricks are easy to break in...- PainterGuy
- Thread
- C++ Mac Os
- Replies: 6
- Forum: Programming and Computer Science
-
C/C++ C++ Programming Basics: A Walkthrough Tutorial
hello guys, i have downloaded dev-c++ as suggested by some nice guys around here. from today i will start practcing with comuter programming. me know nothing about programing but sure will learn it with the help of this forum. okay. i have opened new project named "gorilla" in dev-c++. it...- PainterGuy
- Thread
- C++
- Replies: 27
- Forum: Programming and Computer Science
-
C/C++ What Questions Can We Ask to Challenge Our Arrogant C++ Teacher?
hello everyone, this question is not directly connected with programming so forgive me for asking here. me and my friend have decided to take some c++ classes in a instituion. me have been there once. the guy who teaches (or tries hard at teaching or behaving like teacher) is very rude and...- PainterGuy
- Thread
- C++
- Replies: 6
- Forum: Programming and Computer Science
-
S
C/C++ What Types Can Be Arguments in C++ Class Methods?
I have seen the following in a abook: "The argument(s) of a method can be any type of object (as long as its class has been made available to the program), as well as the predefined default types of variable. For example, methods in our three-vector class are not limited to just accepting...- spaghetti3451
- Thread
- C++ Classes
- Replies: 1
- Forum: Programming and Computer Science
-
D
C/C++ Where can I find a comprehensive C++ crib/reference sheet for beginners?
Hi: does anyone have a link for a C++ crib/reference sheet which includes everything. I'm having hard time with formatting the logic for some of my homework questions and I would like to have a quick reference sheet which explains the functions. I'm using the compiler CodeBlock 10.5 with...- Deeeeee
- Thread
- C++
- Replies: 4
- Forum: Programming and Computer Science
-
G
C/C++ Solving Gauss-Legendre Algorithm in C++
Hello , i have the algorithm attached and i am trying to execute it in c++. My code until now is : ( i have created the function f with limits (-1,1) ) #include <iostream> #include <cstdio> #include <cstdlib> #include <iomanip> #include <cmath> using namespace std; const double...- ggeo1
- Thread
- C++
- Replies: 4
- Forum: Programming and Computer Science
-
C/C++ Object-Oriented Programming in C++ (4th Edition) by Robert Lafore
hello every1, i was able to find this book "Object-Oriented Programming in C++ (4th Edition) by Robert Lafore" in a local library. I am thinking of self-learning c++.. do u have any information on this text...is it easy...im totally blank in this area of programming and computers in...- PainterGuy
- Thread
- C++ Programming
- Replies: 13
- Forum: Programming and Computer Science
-
C/C++ Turbo C++: Is it Any Good for Learning C++?
hello, someone has recommedned to me to use compiler turbo c++... is it any good? what is your take? programming thingy is totally new thing to me...i want to learn c++ though i have no prvious backgrond in this area. your help is much aprreciated. thanx- PainterGuy
- Thread
- C++ Compiler
- Replies: 3
- Forum: Programming and Computer Science
-
G
C/C++ C++ simpson's method -loop doesn't stop
c++ simpson's method --loop doesn't stop Hello, i have done the simpson's method and it works fine.My problem is that it doesn't stop when it gives me the desired result but the loop continues for ever.. #include <iostream> #include <cstdio> #include <cstdlib> #include <iomanip> #include...- ggeo1
- Thread
- C++ Method
- Replies: 8
- Forum: Programming and Computer Science
-
F
C/C++ Efficiently Solving Sudoku in C++
Hey everyone, I'm trying to teach myself C++ and I recalled that a few years ago my Comp Sci major buddy of mine did a sudoku solving program as a project for a class so I decided to tackle it on my own. I'm getting some headway, but I'm having trouble figuring out a way to "brute force"...- Fronzbot
- Thread
- C++ Sudoku
- Replies: 2
- Forum: Programming and Computer Science
-
C/C++ C++ compiler to write not-very-complex DOS/text-based programmes
hello, would you kindly recommend me some simple C++ compiler programme to write not-very-complex DOS/text-based programmes? I'm new to C++, is one supposed to write pseudo-code into the compiler or instructions in terms some high level language? kindly let me know. thanks.- PainterGuy
- Thread
- C++ Compiler
- Replies: 20
- Forum: Programming and Computer Science
-
A
What programming languages are used in computational astrophysics?
Hi, just wanted to know which version of FORTRAN is best to learn for one studying astrophysics...and whether C++ is of any importance in computational astrophysics...Thanks- abbeynewton
- Thread
- Astrophysics C++ Fortran
- Replies: 2
- Forum: STEM Academic Advising
-
J
C/C++ C++ conditional testing fails, why?
I have a long C++ program that has a few simple statements in it. At the beginning I have ; #define NUM_DP 10 Further on in the program I have this conditional statement; short int ct, j; . . . ct = op2.test(op2.num); if (ct < (NUM_DP - 1)) for (j = 1; j < 20...- John O' Meara
- Thread
- C++ Conditional Testing
- Replies: 4
- Forum: Programming and Computer Science
-
B
C/C++ C++ How to gracefully exit multiprocessing
Not a homework problem. I've written a little compute-intensive code. That only keeps one core busy. So I run four copies. But compute time is variable so I thought I'd try my hand at multiprocessing. I can fork to create four processes. No problem. I/O is from cin, cout and the...- Bill Simpson
- Thread
- C++
- Replies: 1
- Forum: Programming and Computer Science
-
G
Comp Sci Help with C++ perfect number program
Ok I've been having a lot of trouble with this program, I am also very new to C++. The program requires to have 4 functions 1 main, 1 svr, 2 void functions any kind of loop (for loop preferred) in the main function so that a user can enter any number of positive integers in the main function...- gbsboard
- Thread
- C++ Program
- Replies: 7
- Forum: Engineering and Comp Sci Homework Help
-
C/C++ Trying to write a program that converts integers to roman numerals in C++
Here is the code that I have come up with. What could be implimented to make it compile and run? It runs, but all that comes up is the request for the integer between 1 and 3999, after I enter the number the program simply ends. CODE: #include <iostream> using namespace std; string...- Demon117
- Thread
- C++ Integers Program
- Replies: 7
- Forum: Programming and Computer Science
-
D
C/C++ What is so special about running a c++ program through commnd line?
I.e., what is beneficial about main(int argc,char *argv[])? I see a lot of seemingly good programmers write the main like this, but what does it do that int main() cannot do?- dmatador
- Thread
- C++ Line Program Running
- Replies: 13
- Forum: Programming and Computer Science
-
X
C/C++ Need help incorperating SOCKS5 Proxies into C++ program
Hi there. I've been trying to incorporate Proxies into a program I am currently making. It's basically a c++ Chat bot that will load proxies from a list and connect from them into a chat, but I'm having a bit of trouble. I've found a SOCKS 5 Wrapper, but I'm having trouble with that as...- x2Dread2x
- Thread
- C++ Program
- Replies: 3
- Forum: Programming and Computer Science
-
C
C/C++ How Can I Best Learn C++ Before Starting a Cognitive Neuroscience PhD Program?
Hello all, I'll hopefully be attending a cognitive neuroscience PhD program next fall and I'd like to learn some programming beforehand (having programming skills helps for lots of neuroimaging labs) Labs I've worked in used UNIX and MATLAB and I'd really like to improve my knowledge before I...- cogneurodude
- Thread
- Approach C++
- Replies: 6
- Forum: Programming and Computer Science
-
A
Comp Sci Difference between some if statements C++
Say for example int a = 0; if ( a ){ ... } int a = 0; if ( a < 0 ){ ... } What's different with the first if statement? or do they have the same meaning? Thanks EDIT: What is the use of two-dimensional arrays? I see it mostly in file input output stream stuff. And...- asz304
- Thread
- C++ Difference
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
G
C/C++ Solve Bisection Problem in C++: Find the Root
Hello, I wrote a code for my problem but i can't find the mistake.It doesn't give me the right answer. We must find the root using bisection method. I found with mathematica that the solution is x= -3.18306. The function values are x (-4,-3). Any help is welcome! #include...- ggeo1
- Thread
- C++
- Replies: 23
- Forum: Programming and Computer Science
-
L
Comp Sci C++ how to obtain the x value of graph corresponding to a certain y value
Homework Statement i have drawn a graph in C++/root which is a bunch of points (in an array) joined together ie it is not a function. it looks kind of like a gauss, but isn't ie its a peak. i want to find out the x distance between the points of 90% and 20% of the maximum. i am having...- lavster
- Thread
- C++ Graph Value
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
C
C/C++ Solving Prime Number Code Error in C++
I was writing a program to find if a given number is prime or not. I can't figure out what the error is. /* To check if a number is prime*/ #include <iostream> #include <cmath> using namespace std; int main() { float a; int p,i,f=0; p=sqrt(a); if(a %...- chaoseverlasting
- Thread
- C++ Code Prime
- Replies: 16
- Forum: Programming and Computer Science
-
J
C/C++ Troubleshooting Segmentation Faults in C++ Operator Overloading
I'm trying to write a program in C++ that reads, writes, adds and substracts numbers entered as C-style strings. I have two questions. Is it necessary that the parameters of the + operator only be always objects of a class? Can an operator call another operator from within it, e.g. my_float...- John O' Meara
- Thread
- C++ Fault
- Replies: 8
- Forum: Programming and Computer Science
-
L
Comp Sci Drawing a graph using C++ / ROOT (CERN)
Homework Statement Im having difficulty drawing a specific graph. I am not entirely sure how to explain my question/ the graph i need to draw so i think the best way is to provide a bit of my code and explain using it the graph using it... the code below gives a read out of the energy...- lavster
- Thread
- C++ Cern Drawing Graph Root
- Replies: 16
- Forum: Engineering and Comp Sci Homework Help
-
L
C/C++ Why isn't my code producing a graph with a log scale in C++?
can someone tell me what is wrong with my code. i get the graph that i want but not with the log scale... i have tried multiple methods. this is the last one i tried (its part of a canvas which is split into quadrants) TH1F* h3 = (TH1F*) inputfile3 -> Get("pdg"); c->cd(3)...- lavster
- Thread
- C++ Scale
- Replies: 4
- Forum: Programming and Computer Science
-
D
C/C++ Problem with iterator for vector of lists in c++
For a function using namespace std; mst(const vector<list<pair<int,int> > > &adj_lists, int v){ // code before iterator list<pair<int,int> >:: iterator it; it = adj_list[0].begin(); // code after } I'm trying to set up an iterator to walk through the list contained within...- dmatador
- Thread
- C++ Vector
- Replies: 2
- Forum: Programming and Computer Science
-
A
Comp Sci What is the use of % in calculations? How can it be used to solve a calculation?
What is the result of.. int*double=? Is it double? int+double=? is it double too? And... What is "%" in a calculation? And how to solve the a calculation using "%"?- asz304
- Thread
- C++
- Replies: 24
- Forum: Engineering and Comp Sci Homework Help
-
A
Comp Sci Why Is My C++ Program Not Running as Expected?
Hi. I need help with in running my program, when I tried it in the computer lab, my program didn't run..And I'm sure it couldn't run because of my workings..which I assume are incorrect. I appreciate it if you could tell me where did I go wrong with my calculations and if it matched the...- asz304
- Thread
- Assignment C++
- Replies: 19
- Forum: Engineering and Comp Sci Homework Help
-
J
Comp Sci C++ determinant of diagonal matrix
Homework Statement well, my assignment was to make a gauss elimination, so now i need to compute the determinant of an n by n diagonal matrix variable rows = number of equations variable i = random integer matrix A[100][100] dummy matrix A2[100][100] Homework Equations det[A]...- jinro
- Thread
- C++ Determinant Diagonal matrix Matrix
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
U
Comp Sci C++ question- turning scores to letter grades, and more
Homework Statement We have multiple sections of a class for which we need to produce grading summaries by section. The grading summaries that we need are a count of how many students earned A’s, B’s, C's, etc., and the lowest, highest and average grade for each section. At the end of...- uwp student
- Thread
- C++ Grades Turning
- Replies: 13
- Forum: Engineering and Comp Sci Homework Help
-
C
C/C++ C++ Passing Variables Between Classes
Hi, I am new to programming, but I think this is a simple error. For my programming code I am trying to pass a variable from a certain class to another class. The code is similar to below.Class 1 #include "class2" Class2 class var1=1 var2=2 class.acceptingvariablesfrom1(var1 var2)...- chronie
- Thread
- C++ Classes Variables
- Replies: 6
- Forum: Programming and Computer Science
-
M
Comp Sci Can't write calculated resulted to file in C++
Homework Statement Dear physics forum, I'm start learning C++ and I'm trying to program a space transform function for linearized convection-diffusion problem using Code:block Everything was fine until I wrote calculated result into a file. When I run the program, some error message...- madtraveller
- Thread
- C++ File
- Replies: 8
- Forum: Engineering and Comp Sci Homework Help
-
S
Comp Sci Solving Unknown Error in C++ Code
after typing these following code when running this code error occurs,but the editor doesn't indicate me where's the problem- SOHAWONG
- Thread
- C++ Error
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
N
C/C++ Should I Learn C or C++ for Scientific Applications?
Hi there, I am a third (maybe second year for US standard?) year mathematical physics student and I have just realize that I do need obtain some programming knowledge. My university has a compulsory courses that teaches java programming, but, looking around I've come to the conclusion that...- noxf
- Thread
- Applications C++ Scientific
- Replies: 8
- Forum: Programming and Computer Science
-
I
Comp Sci First time programming ever and my first project has 1-21 errors in c++
Homework Statement #include <iostream> using namespace std; int main() { int firstNo;// first number is stored here int secondNo, int resultAdd,// variable for result when first number and second number are added int resultSub,// variable for result when first number and second...- ihatecats2014
- Thread
- C++ Errors Programming Project Time
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
I
Comp Sci Help evaluating boolean number and arithmetic operators C++
Homework Statement !( ((count<10) || (x<y)) && (count >=0) ) where count is equal to 0Homework Equations i don't think any equations here are necessary except maybe the precedence lawThe Attempt at a Solution they combined 'and' and 'or' which confused the heck out of me. How do i figure out...- ihatecats2014
- Thread
- Arithmetic C++ Operators
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
T
C/C++ Building Neural Networks with C++
Hello again, Im trying to build a neural network using C++. Has anyone had a go? I think the potential implications are really interesting and would like to hear about how people might have implemented them. Another general one for anyone.- taylrl3
- Thread
- Building C++ Networks Neural Neural networks
- Replies: 5
- Forum: Programming and Computer Science
-
P
C/C++ What is the issue with multiplication in my C++ program?
Hi, I am having an issue with multiplication in C++. I am writing a program to check the validity of an NHS number. To do this I must; multiply digit 1 of the NHS number by 10, multiply digit 2 of the NHS number by 9, multiply digit 3 of the NHS number by 8 ...etc The answer from each...- peterjaybee
- Thread
- C++ Multiplication
- Replies: 13
- Forum: Programming and Computer Science
-
D
Comp Sci Maximum Digits and Bits for C++ unsigned long double
in C++, how many digits and how many bits is the maximum allocated for unsigned long double?- Deathfish
- Thread
- C++
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
M
Comp Sci Is My C++ CellStatus Function Causing Print Failures After First Generation?
it prints fine for the first generation, but nothing else after that. i am thinking that my problem lies in the cellStatus function and its implementation within the printCell function. attached are the files that i am getting input from and the file that i am printing to. #include...- magnifik
- Thread
- C++ File Printing
- Replies: 26
- Forum: Engineering and Comp Sci Homework Help
-
D
Comp Sci What is the Best Way to Create a Secure Password Prompt in C++?
Homework Statement Currently using stdio.h, conio.h, string.h, stdlib.h not using iostream, namespace std etc. I am asked to make a password prompt where each character echoes an asterisk (*) The user must be able to backspace and delete to make corrections. The password is then...- Deathfish
- Thread
- C++ Echo
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
M
C/C++ Should I Learn C++ After Knowing Java?
Hey there, For an Electrical Engineering candidate, will you suggest to learn C++. I am currently know Java and i am thinking about learning C++ by taking an elective course in my university. What do you think? Is it worth to take that course also can C++ help me in my career as an electrical...- makyol
- Thread
- C++ Java
- Replies: 1
- Forum: Programming and Computer Science
-
D
Comp Sci Debugging a C++ Keygen Project: Win32 Console Application
Hi guys, I'm working on a keygen project on C++. Type is Win32 Console Application. For what I've learnt, I'm using stdio.h, conio.h, stdlib.h. time.h so everything is in printf and scanf (not using cin cout namespace std etc) So far I have not yet learned strcompare, dynamic memory so I have...- Deathfish
- Thread
- Application C++ Debugging Project
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
O
Comp Sci Creating a C++ Program to Send Emails
any one can tell me how to make aprogram via c++ to have the ability to e-mail me or any e-mail other than mine . i searched along and no any results i could have . please it is urgent case- oufa
- Thread
- C++ Program
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
B
Comp Sci Convert Seconds to Days, Hours, Minutes, and Seconds Using C++
Homework Statement Write a program that asks the user to enter the number of seconds as an integer value (use type long) and that then displays the equivalent time in days, hours, minutes, and seconds. Use symbolic constants to represent the number of hours in the day, the number of minutes...- Bob Busby
- Thread
- C++
- Replies: 8
- Forum: Engineering and Comp Sci Homework Help
-
C
C/C++ Generating Random Numbers in C++
Hello! I've been trying to create an algorithm which picks a number randomly from array. P.S i have an array like A={1,4,-1,3,-7,2,-14} and I want to pick a number randomly from array. Any idea? Thank you.- chmate
- Thread
- C++ Numbers Random
- Replies: 3
- Forum: Programming and Computer Science