gpt4 book ai didi

c++ - 错误 : expected initializer before ‘std’

转载 作者:太空狗 更新时间:2023-10-29 23:53:06 24 4
gpt4 key购买 nike

anisha@linux-trra:~> make
g++ -c -m64 -pipe -I/usr/lib64/R/include -I/usr/lib64/R/library/Rcpp/include -I/usr/lib64/R/library/RInside/include -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/home/anisha/qtsdk-2010.05/qt/mkspecs/linux-g++-64 -I. -I/home/anisha/qtsdk-2010.05/qt/include/QtCore -I/home/anisha/qtsdk-2010.05/qt/include/QtGui -I/home/anisha/qtsdk-2010.05/qt/include -I. -o zoomCornerPanDatabaseParser.o zoomCornerPanDatabaseParser.cpp
In file included from zoomCornerPanDatabaseParser.h:9:0,
from zoomCornerPanDatabaseParser.cpp:1:
*******************boundaryLineEquation.cpp:6:1: error: expected initializer before ‘std’
make: *** [zoomCornerPanDatabaseParser.o] Error 1

.cpp:

#include <math.h>
#include <string>
#include "boundaryLineEquation.h"

/// This function will return the direction of the new point as w.r.t to the given rectangle.
********************std :: string findPanDirection (float x1, float y1, float x2, float y2, float newX, float newY)
{
if (x1 > x2)
{
float temp = x1;
x1 =x2;
x2 = temp;
}

if (y2 > y1)
{
float temp = y2;
y2 = y1;
y1 = temp;
}

if (newX < x1 )
{

.h:

#include <iostream>

#ifndef RLINE
#define RLINE

std :: string findPanDirection (float x1, float y1,
float x2, float y2,
float newX, float newY);

bool returnDistance (float centerPointLng, float centerPointLat,
float newCenterPointLng, float newCenterPointLat)

#endif

最佳答案

缺少 ; 来自 returnDistance() 声明。应该是:

bool returnDistance (float centerPointLng, float centerPointLat, 
float newCenterPointLng, float newCenterPointLat);
//^

关于c++ - 错误 : expected initializer before ‘std’ ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12579658/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com