Getting started |
|
Common tasks | |
Technologies | |
Application lifecycle management (ALM) | |
Samples and walkthroughs |
|
Additional resources |
|
#include <iostream>
using namespace std;
long factorial(int n);
void main()
{
int m;
cout<<"请输入n值:";
cin>>m;
cout<<factorial(m)<<endl;
}
long fatorial(int n)
{
long result=0;
if(n==0)
result=1;
else
result=n*factorial(n-1);
return result;
}
The output comes out error below:
1>ClCompile:
1> All outputs are up-to-date.
1> Ex_Factorial.cpp
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>Ex_Factorial.obj : error LNK2019: unresolved external symbol "long __cdecl factorial(int)" (?factorial@@YAJH@Z) referenced in function _main
1>D:\Studio\test\Ex_Factorial\Ex_Factorial\Debug\Ex_Factorial.exe : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:06.32
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have try every means whatever I could find, but I can't yet correct the error. Please help me!
motor900
plz help me how do you place content on a form
thanks aleconmsdn
You might want to start from the beggining with a simple Hello World tutorial.
Lots of samples out there. Google away!>!>!>!>!
Richhuddy
Lots of samples out there. Google away!>!>!>!>!
it keep saying that there r a missing source file ..
and when i build solution it says
fatal error C1083: Cannot open precompiled header file: 'Debug\yasmine alwa'al.cpp.pch': No such file or directory
wt should i do??
Problem unable to add data to access database please help !
Private Sub Add_Click(sender As System.Object, e As System.EventArgs) Handles Add.Click
Dim con As New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=myDB.mdb")
Dim da As OleDbDataAdapter = New OleDbDataAdapter()
Dim cmd As New OleDbCommand
Try
cmd = New OleDbCommand("INSERT INTO Users (userid, password) " +
"VALUES ('" & UsernameTextBox.Text & "','" & PasswordTextBox.Text & "')", con)
cmd.Parameters.Add("'" & UsernameTextBox.Text & "' , '" & PasswordTextBox.Text & "' ")
da.InsertCommand = cmd
MsgBox("User added")
Catch ex As Exception
MsgBox("Sorry user was not added")
End Try
Return