49,761 Topics

Member Avatar for
Member Avatar for thinkaboutyoueveryday

`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 …

Member Avatar for NP-complete
0
199
Member Avatar for ShEeRMiLiTaNt

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 …

Member Avatar for Agni
0
149
Member Avatar for smart.saravana.1

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 …

Member Avatar for smart.saravana.1
-1
151
Member Avatar for thinkaboutyoueveryday

# 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. …

Member Avatar for thinkaboutyoueveryday
0
224
Member Avatar for thinkaboutyoueveryday

# 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 …

Member Avatar for thinkaboutyoueveryday
0
292
Member Avatar for subi09

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. …

Member Avatar for subi09
0
225
Member Avatar for new_developer

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 …

Member Avatar for Lerner
0
291
Member Avatar for Sunshinex3

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 …

Member Avatar for Ancient Dragon
0
124
Member Avatar for rodrigo.l.salazar.14

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 …

Member Avatar for Ancient Dragon
0
162
Member Avatar for Sasquadge

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 …

Member Avatar for Prysm[VA]
0
167
Member Avatar for ousaf
Member Avatar for Prysm[VA]
0
203
Member Avatar for marnun

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 …

Member Avatar for marnun
0
2K
Member Avatar for vmanes

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 …

Member Avatar for NathanOliver
0
1K
Member Avatar for kingrev

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 …

Member Avatar for deceptikon
0
258
Member Avatar for pinaka

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: …

Member Avatar for thendrluca
0
155
Member Avatar for harris24

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> …

Member Avatar for harris24
0
344
Member Avatar for newBieGirl20

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 …

0
110
Member Avatar for marnun

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 …

Member Avatar for marnun
0
1K
Member Avatar for DJWK

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 …

Member Avatar for rxlim
0
264
Member Avatar for AznWun

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 …

Member Avatar for ravenous
0
320
Member Avatar for GeneClaude

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 …

Member Avatar for Ancient Dragon
0
461
Member Avatar for pjh-10

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 …

Member Avatar for gazzatav
0
160
Member Avatar for darkeclipse8

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: …

Member Avatar for NathanOliver
0
400
Member Avatar for szejna

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 …

Member Avatar for szejna
0
264
Member Avatar for marnun

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. …

Member Avatar for marnun
0
3K
Member Avatar for myk45

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 …

Member Avatar for myk45
0
178
Member Avatar for Hey90

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 …

Member Avatar for Hey90
0
183
Member Avatar for agnes333

Does anybody has a hint how can I learn game development for slot /fruit/machines?? Thanks !!

Member Avatar for gamblingcoder
0
349
Member Avatar for sushan bastola

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!!

Member Avatar for Ancient Dragon
0
77
Member Avatar for GokuLSSJ4

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 …

Member Avatar for GokuLSSJ4
0
331

The End.