close
Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中 
Are you an avid runner? Or even just starting out?

Brooks designs high-performance men's and women's running shoes, apparel and accessories.
From our sponsors
C++語法錯誤Debug
Apr 30th 2014, 11:00

各位大大們好, 小弟有個C++的問題想像各位大大請教,程式碼如下:
錯誤訊息是: error: expected unqualified-id before 'while' while (ipp != sizep)
可否請大大們給點意見或幫忙除錯, 非常感謝你們

#include <iostream>
using namespace std;

void func1(int *a, int size)
{
cout << "Multiplicand:" << endl;
for(int x = 0; x!= size; x++)
{
cout << a[x] << " ";
}
cout << endl;
}
void func2(int *b, int size)
{
cout << "Multiplier:" << endl;
for(int y = 0; y!= size; y++)
{
cout << b[y] << " ";
}
cout << endl;
}
void func3(int *p,int size,int sizep)
{
cout << "PP generation:" << endl;
int *ipp = p,
while (ipp != sizep)
{
for(int i = 0; i!= size; i++)
{
for(int j = 0; j!= size; j++)
{
p[ipp] = a[j] * b[i]
ipp = ipp+1;
}
}
for (int z=0; z!= sizep; z++)
{
cout << ( p[z] )<< " ";
}
}
}
int main()
{
const int size = 8;
const int sizep = 16;

int a[] = {0, 0, 0, 0, 0, 0, 0, 0};
int b[] = {1, 1, 1, 1, 1, 1, 1, 1};
int p[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

func1(a,size);
cout << endl;
func2(b, size);
cout << endl;
func3(p,size,sizep);
cout << endl;
}

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 marccmpt 的頭像
    marccmpt

    信貸利率, 個人信貸, 小額信貸, 信貸試算, 信貸銀行, 信貸條件, 信貸比較, 中國信託信貸, 公教信貸, 信貸利率最低

    marccmpt 發表在 痞客邦 留言(0) 人氣()