Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[EASY FIX] I am working in C++, making a pretty simple function that is supposed to calculate the standard deviation of a given number entered

[EASY FIX] I am working in C++, making a pretty simple function that is supposed to calculate the standard deviation of a given number entered by the user. I have all the logistics of the program figured out and don't need help with anything specific. But there is one error I get when attempting to compile my program. It reads " 'void*' is not a pointer-to-object type. Below is my code as well as a picture of the error message. If I could receive a solution as soon as possible I would really appreciate it. It seems like it should be an easy fix

image text in transcribed

CODE BELOW

#include #include #include "stddev.h" using namespace std; void stats (float *data, int n){ float mean = 0; int i; for (i = 0; i In file included from /usr/include/c++/5/tgmath.h:35:0, from stddev.cpp:2: stddev.cpp: In function stddev.cpp:33:26: error: 'void*' is not a pointer-to-object type void stats(float*, int)': float stdDeviation = sqrt(mean); stddev.cpp:33:26: error: 'void*' is not a pointer-to-object type float stdDeviation = sqrt(mean); stddev.cpp:33:26: error: 'void*' is not a pointer-to-object type float stdDeviation = sqrt(mean); stddev.cpp:33:26: error: 'void*' is not a pointer-to-object type float stdDeviation = sqrt(mean); stddev.cpp:33:26: error: 'void*' is not a pointer-to-object type float stdDeviation = sqrt(mean); stddev.cpp:33:26: error: 'void*' is not a pointer-to-object type float stdDeviation = sqrt(mean)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions