49,761 Topics
| |
`Inline Code Example Here`**I REVISED MY PROGRAM** #include <iostream> #include <cmath> using namespace std; int main () { const int num=100; float volt[num], sum=0, sum2=0 ; double ave2,standrddev1, standrddev2, standrddev; float average; int i, k=0 ; { cout<<"Enter the number of voltages to be analyzed:"; cin>>k; if (k>100) { cout<<"Maximum … | |
Hello, I am tryinng to write a program that uses the cin.getline() function to get a users input, but I only need the numbers from this. The problem I am having is when I enter a number then other character it will count the characters after the numbers as numbers … | |
Hi frnds..im Saravanan..im studyng my BE in Govt.college of technology,coimbatore...in our college around 84 companies are coming for computer science students...lik microsoft,comvault,etc...bt i hav second thoughts!!...i want to achieve somthing great...we should prove that we are more worth in this world than modifying an old softwares...we hav to invent somthing … | |
# we are assigned to develop a c++ program that accepts a list of a maximum of 100 voltages as input, determine both the average and standard deviation of the input voltages, and then displays the results. There are still errors and it says it requires array or pointer type. … | |
# Develop a c++ program that accepts a list of a maximum of 100 voltages as input, determines both the average and standard deviation of the input voltages and then displays the results. # ## step 1 : requirements : an average, standard deviation step 2: develop solution: the input … | |
i started reading about templates and i got confused on the below. template<class T> T max(T t1, T t2) { int if (t1 > t2) return t1; return t2; } int main(){ std::cout<<max<int>(120,14.55); return 0; } o/p is 120 .But when i compiled the above i got the below warning. … | |
In the following program i can't access balance value of parent class in the child class. If the child class can access all attributes and methods of parent class, then why i am getting 0 value when i access parent class balance. Anyone please help, my programming understanding is very … | |
So the program compiled but as soon as you enter a number for the length of the word it comes up with a segmentation error. Here is my code .h #ifndef GUESSER_H #define GUESSER_H #include <string> class Game; class Guesser { public: // Initialize the guesser for a game with … | |
Hello! I need to read 50 intergers from a text file and put them in an array.Then I have to seperate the numbers into different arrays to see if they are even or odd. This is what I have and all I get as a cout is a place in … | |
So my program is running just fine and doing what it should beside one little thing. That thing is when I run the formula on the for loop. What it does is when I put in 5 and select the for loop operation it gives me the right answer. But … | |
Can some one briefly tell me about that how to do fileprocessing in c++ | |
Next exercise from codeLab that I am getting logical error indication for. What am I missing? Thanks in advance. > You are given an array x of string elements along with an int variable n that contains the number of elements in the array. You are also given a string … | |
This is for the more experienced folks. Recently I found that in Visual C++ 2010 (and 2012, not sure about earlier versions) one can use a std::string as the file name argument for the .open( ) function. I've always known the .open( ) function to take only char* (C-style) strings … | |
| Hi everyone I hope you guys could give me a hand with this project, I am not an expert of c++ and i am really struggling with this. here is the problem: I been asked to make a programn as follows: A new railway journey planner is required to help … |
can anyone tell how to make delete function for my program.......and how can i insert more than one value .....ie whenever i insert a value ........the program inserts and then exits.....Thanks in advance!!!! #include<iostream> using namespace std; class linkedlist { private: struct node { int info; node *next; }*head; public: … | |
Error 6 error C2143: syntax error : missing ';' before ')' c:\users\datacompress.cpp 214 1 Error 8 error C2039: 'putSymbol' : is not a member of 'std::basic_ofstream<_Elem,_Traits>' c:\users\datacompress.cpp 291 1 Error 9 IntelliSense: class "std::basic_ofstream<char, std::char_traits<char>>" has no member "putSymbol" c:\users\datacompress.cpp 291 12 #include <fstream> #include <string> #include <iostream> #include <ostream> … | |
I have an assignment on the data structures directed graph and I have got this question but I did not understood what exactly it needs Here's the question : There is a list of nodes and edges like A B B C D E F B The first line says … | |
Hi, another codelab sorting exercise I am having problem with. any advice is appreciated. ---------------------- > You are given an array x of int elements along with an int variable n that contains the number of elements in the array. There are no duplicates in this array. You are also … | |
I have several files to include from a subfolder and I just can't get this to work. I'm propably missing something here... The Makefile and .cpp with main function are located at /path/to/ and files to be included are at /path/to/src/buffer and /path/to/src/hash. Both of these folders have .cpp and … | |
Hey guys, I've tried writing code to reverse my sentence, but I keep getting an error in my for loop saying "Expected Expression". Also, should the asterisk go after the "modify" in my code? I'm not sure how pointers are exactly supposed to work and I haven't been given any … | |
I won't be asking for a source code yet. What I need to figure out is the process of a certain Math problem with the equation that seemed to be impossible to be converted to source code. Here it goes: **A certain waveform is 0 volts for time less than … | |
cant get this to run on my compiler, any idea of where im going wrong in my code here, any help would be so helpful #define pi 3.1415926535897 #include<iostream> #include<math.h> using namespace std; int main () { double lat1=pi/180; double long1=pi/180; double lat2=pi/180; double long2=pi/180; // initilaise values double latz … | |
My professor asks me to program the Game Of Life with some required and I find unnecessary classes. But anyhow as I am coding and running the program midway I run into this problem void Life::setup_grid() { cout << "Size of Grid: " << grid.size() << endl; cout << "rows: … | |
Hello, I am working on a homework problem that has to do with inheritance, I thought that as long as the class interface and implementation files for the base classes the derived would work with the include statement: #include "salariedemployee.h" and the line class administrator : public salaried employee. I … | |
This is the exercise I have in codelab. I've been going over and over, and just can't see how to do it without an array. Must be something simple that I am missing. Any suggestions? _____ Assume you have a int variable n that has already been declared and initialized. … | |
Hello All, I needed some clarifications w.r.t making functions thread safe. Now, i understand that irregularities can occur in results when not making functions thread safe. But could this somehow lead to a crash? (say some illegal access of memory) Could anyone please give an example of this(something that you … | |
How would I pass an element in a struct array. I have to call the function: new(Shoe[num], num); where num is the number of elements in the database. I have declared the function as: void new(Shoes Shoe[], num); but I get the error: cannot convert 'Shoes' to '*Shoes' for argument … | |
Does anybody has a hint how can I learn game development for slot /fruit/machines?? Thanks !! | |
I am using windows 8 and i just installed dev c++ in my computer but whenever i type a c program and compile it,it gets compiled but when i run it, it says source file not compiled.. any help is appriciated!! | |
hello people I just started to learn C++ 3 days ago, I am just 13 yrs old I have made this basic maths utility tool or you can call it a calculator but it tells everything, multiplication, division, addition, subtraction at once. // if you could help me with it … |
The End.