so my code works in shell but doesn’t work in pico c++ editor.cpp compiler
these are the errors i get:
top_div_array.cpp:81:71: missing terminating ” character
top_div_array.cpp:82:2: missing terminating ” character
top_div_array.cpp: In function `void print_result(float*,std::string*, int)’:
top_div_array.cpp:82: error: syntax error before stringconstant
gen242@cs04:~>
and this is my code:
//poonam patel
//cs 102 spring
//calculates highest divisions sales using array and prototypesfunction
//libraries
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
//function prototypes
void populate_div_sales(float[], string[], int);
int findHighest (float[], int);
void print_result(float[], string[], int);
int main()
{
int top_div_index = 0;
float div_sales[4];
string div_regions[4];
//arrays for regioons
div_regions[0] = “Northeast”;
div_regions[1] = “Southeast”;
div_regions[2] = “Northwest”;
div_regions[3] = “Southwest”;
//function
populate_div_sales(div_sales,div_regions,4);
//debug
cout<<“debug print for arraydiv_sales_array”<<endl;
for (int i=0; i<4; i++)
{
cout<<div_sales[i]<<endl;
}
top_div_index = findHighest(div_sales,4);
cout<<“debug fortop_div_index:”<<top_div_index<<endl;
print_result(div_sales, div_regions, 4);
return 0;
}
//division sales
void populate_div_sales(float f_div_sales[], stringf_div_regions[], int
PayPal Gateway not configured
PayPal Gateway not configured