C++ Definition and 813 Threads

  1. 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...
  2. 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...
  3. 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...
  4. 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
  5. 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...
  6. 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.
  7. J

    C/C++ Native C++ vs. Managed languages (C#)

    Hello there, There's a question that keeps running in my head, which I wanted to share with you. I've always loved C, C++ and low level languages, like Assembly. I like to think that I stay close to the processor and other devices. This is usually faster, and in my mind, easier to...
  8. C

    C/C++ What's the best form of IPC for two Windows C++ applications?

    I have two Windows Visual C++ programs that need fast inter-process communication. One is limited to 64-bit because it depends on 8 gigs of ram, and the other is limited to 32-bit because it depends on a proprietary 32-bit .dll I need to send basically two integers from the 64-bit...
  9. G

    Help with programming a Keithley 220 Current Source in C++

    Hello guys, I want to program a Keithley 220 Current Source using C++. (C++ is m only option). (My task is to find out the V-I relation of a certain sample for which I want to program the current source). I am having problems getting the device into remote operation mode. I try to...
  10. H

    C++ Independent Study for Research Position Advice

    Hey, I go to the University of Rochester, and I am currently entering my sophomore year as a physics major. Speaking to one of the physics department's staff members at the school, I was able to set up a research position with one of the professors in the astrophysics department. In order for...
  11. H

    C/C++ Troubleshooting a C++ Program: Result Window Not Staying Up Long Enough

    I have been creating simple programs from the hello world one to simple math and loops - all of a sudden when I went to practice more today my programs would be completed but the window showing the result would pop up and almost instantaneously close itself - in the end I can't see the result...
  12. A

    C/C++ C++ : Program that gives u the prime factors

    i need help making a program that only displays the prime factors ex: 100 = 2*2*5*5 i got the program to display all the factors but after that I am lost. here is the code so far oh its in C++ #include <iostream> using namespace std; int main() { cout << "Enter a number: "...
  13. C

    Comp Sci Plotting sin x on an XY Plane with C++

    Homework Statement Hi, I'm writing a c++ code which is about making an xy plane with dots and then using an array an plot a math function with a character. the functions i need to plot are sin x, sqrt x and a polynomial. so far I attempted to make a function for plotting sin x, but I always get...
  14. CFDFEAGURU

    C/C++ How to Use a Map in C++ for Pipe Sizes and Schedules?

    Hello all, I am using 2008 C++ Express edition on a Windows XP machine and I have the following question regarding use of a map. How would you use a map to do the following: The user enters a pipe size, say 1/8" NPS, now there are three possible schedules for that pipe size. They are...
  15. R

    C/C++ Learn C++ Programming: Tutorials, Books & Notes for Beginners

    Hello! I just finished reading the C++ tutorial on cplusplus.com that is a very basic introduction into variables, constants, control structures, compound data types and some object-oriented elements. Now I want to go on and I am looking for some good tutorials, books or lecture notes. I am a...
  16. P

    C/C++ Learning Visual C++ 2010 Express IDE: Recommended Resources

    I need to learn how to use the Visual C++ 2010 express IDE. My programming skills are good enough to write code but when i open a project in the 2010 IDE I am overwhelmed by what is presented as the starting code. I have never used this environment before. Is there a good book on the IDE that...
  17. P

    C/C++ Where can I find information on C++ 2010 Express for a software rewrite?

    Does anyone know where I can find lists of the names of functions, header files and key words along with the definitions and uses? I have no information beyond about 1985. I am sure there are some that were kept through the ANSI changes but I rerally need those and the only book I found hasn't...
  18. Y

    C/C++ Using 386 Interrupts in C++: How to Execute Assembly Code

    Hello every body, I have a doubt, I'm working right now with a micro 386, so I'm using it's interruptions, but I want to link c++ with assembly code and I don't know how can I use an interruption inside c++, I hear that is not possible to execute assembly code form a high level language, I,m...
  19. V

    C/C++ Troubleshooting a Private Member Double Array in C++

    I have been pulling my hair out on this one. I have a double** that is a private member of a class. The constructor declares and initializes it as a 2 dimensional dynamic array of doubles (an array of arrays). Then it sets every element of the array equal to 0 with a set of two nested for...
  20. B

    C/C++ HELP: Fluid Dynamics and Simulating with C++

    Sorry I'm not sure where to post this as there is no explicit fluid dynamics forum - i just did a search and noticed majority of posts fell into the "mechanical engineering" forum for some reason. Sorry about that. Today my professor has told the class that by next week we have to code in...
  21. P

    Comp Sci C++ fmod() Function Returning Wrong Value. Why?

    Good day! I'm busy with a simple little program to obtain values for a first order differential equation using the second-order Runge-Kutta method. I want the program to only print values for x = 0, x = 0.2, x = 0.4...x = 1.2 and am using the fmod(double, double) function in the cmath header...
  22. V

    C/C++ Why Aren't My C++ Array Functions Working?

    Have read a million different sites and threads, but still not getting anywhere (damn 1st year java makes addresses incomprehensible!). What changes do I need to make to get these c++ functions to work? //---------Functions //-- A function to increment the (n,m) element void...
  23. R

    C/C++ Recommend books on Python/ C++ Programming

    idk if some of you remember Recommend a book on Python Programming thread i created a while back. As some of you suggested, i bought Lutz's book. I've looked into (or at least skimmed through) most of the book...i really liked it. I'm currently working on GUI Tkinter, it seems interesting...
  24. G

    Comp Sci C++ Array Help: Solve Troubleshooting Issues

    I am having trouble trying to get my code to run for the following: // Use substitution strings to replace all the occurrences // of multiple tags in the lines of text in a form. // The user enters the filename. // The tags and their substitution strings are found in another file. // The...
  25. C

    C/C++ How Does C++ Handle Substring Searches?

    I was reading my textbook to study for a test in my C++ class and I cam across this question and the answer is not in the book. I'm afraid I might need to know how to do something like this for my test and there isn't an example of one like it in my book. I'm not sure how to do it so I don't...
  26. T

    Comp Sci Borland C++ programming quistion, what's wrong with my program

    This program is supposed to add 2 integers ,according to the compiler, there are 2 warnings and 1 error ,the error is (undefined symbol' end') the warnings are 'sum' and 'y' are declared but never used here is the program : # include <iostream> # include <conio.h> intmain() { int x; int...
  27. A

    Comp Sci C++ Probability of Birthday Paradox for Room of 50 People

    Homework Statement Write a program that approximates the probability that at least two people in a room of 50 people have the same birthday. Run 5,000 trials, count up the number at least two people have the same birthday, and divide by the number of trials to get a probability. Homework...
  28. N

    C/C++ What happened to C++ Primer Plus 6th ed?

    http://www.mypearsonstore.com/bookstore/product.asp?isbn=0672329395&xid=PSED My clock must be off about a year.
  29. madmike159

    C/C++ Checking Digit Range in C++ - Any Suggestions?

    I want the user to enter a number from 1 to 9, then check its in that range and a number. This is the code I have, but its not working. int NumPlayers = 0; do { cout << "Please enter a interger from 1 to 9." << endl; cin >> NumPlayers; } while(isdigit(NumPlayers) && (1 <=...
  30. M

    C/C++ Fixing a C++ Program Error: Negative Square Root

    hi there, i have written a small program in C++ and if the user puts in the wrong values for some of the variables the operation will end up trying to square root a negative number and this returns that the answer is not a number can anyone show me how to write an if function that if...
  31. F

    C/C++ Adaptive step size algorithm in c++ for runge kutta

    Hey guys, Attempting to write an adaptive step size function into a 4th order runge kutta integrator for basic orbits. The problems (so far) are as follows: 1.) The step size does not seem to change as one would expect if the recursive definition of the StepSize function was working...
  32. A

    Comp Sci Making a circle within a square in C++

    Homework Statement Write a program which draws a filled circle inside an empty square using "*" and ".", respectively. You should prompt for the radius r of the circle and the side length s of the square, and check that the circle will fit completely inside.Homework Equations The Attempt at a...
  33. C

    Comp Sci C++ Question: Display Element1 Contents

    #include <iostream> #include <iostream> #include <string> using namespace std; struct ElementType { string Element; int AtomicNumber; float AtomicMass; float Density; }; int main() { ElementType element1, element2; element1.Element = "Boron"; element1.AtomicNumber =...
  34. R

    Comp Sci  C++ Console Plotting Sine Function

    Homework Statement Write a program that plots and labels the points of the sine function. Homework Equations I can't figure out how to give the points horizontal position. I think it's position is determined by printing a series of 'space' characters followed by a '*' to mark the...
  35. E

    Comp Sci C++ Lists & Iterators: Program Writing for Second Semester Prog.

    We're only second semester programmers who don't know too much. Homework Statement Using lists and iterators, write a program which accepts string inputs from the console and outputs them in alphabetical order. If the whole program has to be rewritten, fine. I've spent way too much stupid...
  36. J

    Comp Sci Fixing C++ Class Function for Complex Numbers

    For one of my assignments, I have to write a program to add or subtract complex numbers. I wrote a class, and the problem I am having is that one of my methods isn't returning the data to the calling object. I am going to omit the things in my code that I don't think are pertinent. int main()...
  37. F

    Comp Sci Calculating the First Day of the Week using the Julian Method

    Hello... the is my code: #include<iostream.h> #include<iomanip.h> void show(int m, int w, int n) { cout<<endl<<"Sun Mon Tue Wed Thu Fri Sat\n"; cout<<setw((w*5)+1); for(int r=1;r<=(7-w);r++) cout<<r<<" "; int count=0...
  38. M

    Comp Sci C++ code; unforced damped oscillator

    Homework Statement I have an assignment to make a C++ program (I've never seen C++ before, and my professor has never taught it) that makes a set of displacement values corresponding to the motion of a damped oscillator. The function is: x = A*e^{(-\gamma*t/2)} * cos(\omega*t) where...
  39. K

    C/C++ Solving C++ Function Calling Error in Code

    Hello, I have been pretty good with this stuff...but this is the umteenth time I have run into this error. I have gone around it by just using the direct function in the code, but I really really want to master this function calling. My compilation error is always term does not evaluate to...
  40. R

    C/C++ ANSI Std. C++ Looping Menu while checking user input

    I am trying to solve a little problem that I have. I need to create a simple win32 console app that displays a multiple option menu on a x second loop. That part is easy. Where I am getting stuck is this: While the app is looping outputting the menu, it also needs to be able to check for a...
  41. CFDFEAGURU

    C/C++ Using try catch vs do while loops in C++

    Hello all, First let me state the following: 1. The programs that I write are not production code. 2. I am not a trained developer. 3. I do not work for a software development company. My question pertains to the use of try catch exception handling vs. using do while loops...
  42. W

    Comp Sci How Can You Track the Path of a Destruction Droid in C++?

    Homework Statement Problem Destruction Droid Introduction Life was easy and happy on the third moon of Sirius 8: people lived and worked in the many peaceful colonies. However, the Klingon Empire decided to extend its control to this part of the galaxy: they landed a Destruction DroidTM on...
  43. L

    C/C++ C++ programming and electrical engineering

    Is C++ programming used in electrical engineering work, it really doesn't seem as though it would be,but what could it be useful for, some kind of possible scenario ? (E.E. encorporates the use of electricity to make things happen mainly, whereas C++ has to do with computer design)
  44. L

    Comp Sci HUGE C++ Problem: Solve Errors on Pastebin.com

    The code would be too long to paste here, so I've put it up on PasteBin. http://pastebin.com/m1190678c My compiler has an issue with every single getline(): This is just for the one on line 161. Error 4 161 error C2784: 'std::basic_istream<_Elem,_Traits>...
  45. O

    C/C++ C++ Random Function: Generate Uniformly Distributed Numbers

    Hallo, I'm looking for a Random function in c++. i tried to use in the function rand()% but it does not generate a truly uniformly distributed random number in the span (since my span is large. 100000*100000). in other word it dosent generate a random number in equal probabilty in lage...
  46. B

    C/C++ C++ newbie qu: grid construction for finite difference

    Hello everyone: I am a C++ newbie; I am interesting in using C++ in my work on coupled fluid flow-chemical reaction problems. I apologize in advance for what is probably a very simple question. I would very much appreciate any help to get me on the right track! My goal is to come up with...
  47. L

    Comp Sci Organizing C++ Functions with Header and Include Commands

    Hi there everyone. I have a program I'm going start writing for class with a bunch of functions I want to keep in separate .cpp files for organizations. So what I'm thinking I could do is create a header and have all the command library include commands in there, as well as the include...
  48. J

    Comp Sci Beginner C++ - identifier not found

    Any help is greatly appreciated Homework Statement I am trying to sort a string of vectors in the proper order. My problem does not involve theory, it involves syntax errors. Moving from Java to C++ is sure a pain.. I have 2 c++ files, sorting.h and sorting.cpp I keep getting this error...
  49. S

    Comp Sci How can I print integers as a string in C++ using character arrays?

    Homework Statement I have a bunch of integers stored in a character array, and I am trying to print the integers as characters. I can print them as characters when I use %c in the print statement, but the problem is I need to print them as a string. My program crashes when I attempt to use...
  50. L

    C/C++ Delay C++ Command: Timing Song Lyrics

    Hi there PF. I was wondering if there was a C++ command that delayed a command being run for a certain period of time. I'm trying to make a program that outputs the lyrics to a song at the right times.
Back
Top