我今天安装了NetBeans 7.0.1当我尝试使用"scanf"执行C程序时,它会给出奇怪的错误
这就是我写的:
它一直运行,直到我在输出控制台中输入内容.

输入后显示printf语句并显示"RUN FAILED"

任何人都可以告诉我该怎么做才能做到这一点?
.aspx文件:
<%@ Import Namespace="System.IO" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Explorer</title>
</head>
<body>
<form id="form1" runat="server">
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
.CS文件:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
public partial class view2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string path = "~/";
GetFilesFromDirectory(path);
}
private static void GetFilesFromDirectory(string DirPath)
{
try
{
DirectoryInfo Dir = new DirectoryInfo(DirPath);
FileInfo[] FileList = Dir.GetFiles("*.*", SearchOption.AllDirectories);
foreach (FileInfo FI in FileList)
{
Console.WriteLine(FI.FullName);
} …Run Code Online (Sandbox Code Playgroud) 我试图在按钮点击的新选项卡/窗口中打开一个页面.我试图在谷歌得到这个代码,但它无法正常工作.
任何人都可以帮我吗?
<asp:Button ID="btn" runat="Server" Text="SUBMIT"
OnClick="btnNewEntry_Click" OnClientClick="aspnetForm.target ='_blank';"/>
protected void btnNewEntry_Click(object sender, EventArgs e)
{
Response.Redirect("CMS_1.aspx");
}
Run Code Online (Sandbox Code Playgroud)
当我使用它时,我收到错误说
Microsoft JScript runtime error: 'aspnetForm' is undefined.
Run Code Online (Sandbox Code Playgroud) FileInfo[] FileList1 = Dir.GetFiles("*.doc", SearchOption.AllDirectories);
foreach (FileInfo FI in FileList1)
{
Response.Write(
"<td><a href= view5.aspx?file=" + strheadlinesid + "\\" +
FI.Name + " target=_self;> " +FI.Name + "</a></td>");
}
Run Code Online (Sandbox Code Playgroud)
当我尝试用空格打印文件名时,它会在文件名中的空格位置添加"#",这会给我带来麻烦.任何人都可以告诉解决方案
SqlConnection conn = new SqlConnection("Server=ILLUMINATI;" +
"Database=DB;Integrated Security= true");
SqlCommand comm = new SqlCommand(
"Insert into FileUpload ('FilePath','TypeId','UploadedBy','UploadedDate')
values (" + savePath + "," + typeid + "," + NAME + "," + DateTime.Now+ ")", conn);
conn.Open();
comm.ExecuteNonQuery();
conn.Close();
Run Code Online (Sandbox Code Playgroud)
它给出了一个错误说:
{"'C'附近的语法不正确."}
请有人告诉我错误.