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...
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...
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...
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
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...
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.
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...
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...
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...
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...
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...
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: "...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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 <=...
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...
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...
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...
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...
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...
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()...
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...
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...
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...
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...
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...
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...
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)
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>...
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...
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...
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...
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...
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...
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.