#include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
Run Code Online (Sandbox Code Playgroud)
我需要这个代码的帮助.我的编译器一直要求我使用-fpermissive选项,但我不知道在哪里输入它.我已经粘贴了下面的代码和显示的错误.
using namespace std;
int cx = 0, cy = 0;
double x =0, y=0, r = 5;
int main(){
ofstream myfile;
myfile.open("dingo.txt");
for(int g =0 ; g <= 360; g++)
//find x and y
//Get points of a circle.
x = cx + r * cos(g);
y = cy + r * sin(g);
//This is what pops up below:
//In function int main()':
//Error: name lookup of 'g' changed for ISO …Run Code Online (Sandbox Code Playgroud)