Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need to read the dataset from the file which looks like something I have posted. I need to store first two number as width
I need to read the dataset from the file which looks like something I have posted. I need to store first two number as width and height and read the rest of the data and store it in a 1D array(for instance, int *data = new int[size];). while doing so I need to keep track of maximum value.After that need to scale each value in array in 0-255 range. Need to code in c++. Help please. thank you
480 480 12537 2483 2475 2480 2518 2532 2480 2478 2431 2428 2440 2426241123792330 2383233122742323 23082289 2275 12273 2178 2139 2112219420952118 2124 2125 2135 21322134 2134 2131 2137 2137 2117 2106 2086 2009 2049 2102 2113 2144 2182 2195 2208 2209 2166 2142 2143 2136 2108 2132 2113 2095 2094 2092 2096 2094 2043 2083 2075 2040 2037 2053 2062 2077 2146 2149 2145 2122 2111 2112 2112 2098 2089 2072 2060 2048 2032 2005 2001 2022 2043 2059 2058 2044 2054 2050 2014 2000 1990 1982 2003 2019 1979 2001 1999 2014 2004 1997 2013 1994 1990 1963 1995 2004 2027 1996 1994 1998 2002 1958 1941 1915 1914 1877 1869 1895 1939 1889 1901 1875 1862 1880 1846 1836 1844 1862 1866 1887 1891 1874 1870 1870 1871 1869 1870 1871 1873 1860 1857 1870 1871 1875 1883 1891 1901 1908 1895 1881 1874 1882 1883 1888 1891 1893 1911 1952 1954 1955 1954 1966 1962 1979 1974 1985 1996 2018 2015 1993 1985 1964 1951 1961 1980 2010 2024 2016 1985 1982 2002 1992 1966 2020 2022 1996 2109 2134 2068 1972 1972 1972 1973 1985 1980 1995 2090 1980 1993 1998 2056 2023 2026 2023 2027 2036 2044 2037 2037 2121 2060 2045 2060 2166 2270 2225 2173 2150 2137 2083 2092 2130 2142 21432122214820972097 2114 2136 2173 2154 2239 2278 2370Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started