#person{
position:10px,10px,10px,19px
font-size:18px;
color:blue;
text-align:center;
margin-left:18px;
}
/*时间:2011年9月9日15:02:27目的:以学生成绩管理为例学习结构体使用的基本知识要求:了解定义结构体的三种方法,掌握推荐使用的第一种 掌握结构体初始化和赋值的方法 熟练掌握取出结构体成员的两种方法 1. 变量名.成员名 2. 指针变量名->成员名 (这种更常用) 认真体会为什么两者等价*/# include <stdio.h>//定义结构体的第一种方法,推荐使用struct student //定义一个结构体,实际上是定义了一个叫struct student的复合数据类型{int age; ...
class A{public:void f1(){cout << "A.f1()" << endl;}
void f(){f1();//f3();}};class B:public A{void f1(){cout << "B.f1()" << endl;}void f3(){cout << "B.f3()" << endl;}};
B b;b.f();输出为A.f1(),也就是说执行的是基类中的f1()函数。如果python中实现相同的代码如下:class A:def f1(self):print "A.f1";def f(self):self.f1();#self.f3();...
当我回想时,我才发现我长大了,我理这逐渐得到了什么,失去了什么!
原来是我失去了!
/*时间:2011年9月8日16:21:28目的:学习构造构造数组的方法,了解动态数组使用上与静态数组一样简单,并体会动态数组的优点备注:优点包括 1.动态数组的长度可由程序员输入,不必事先指定 2.动态数组的内存可由程序员手动分配和释放 3.动态数组的长度可由程序员手动增长或缩短 4.动态数组方便进行跨函数使用(这个以后在学)*/# include <stdio.h># include <malloc.h> int main (void){ int a[5]; //这是构造静态一维数组,如果int型占4个字节,所以系统自动分配了固...
session.setAttribute("name","郑州标牌厂家");
session.setAttribute("keywords","郑州路牌厂家");
session.setAttribute("keywords2","郑州停车场设施");
session.setAttribute("keywords3","国通标牌");
session.invalidate();
<!-- web的session -->
import java.swing.*;
import java.awt.*;
class StringDemo extends JFrame{
String key1 ="郑州标牌厂家";
String key2 ="郑州路牌厂家";
String key3 ="郑州停车场设施";
String key4 ="国通标牌";
String key5 ="郑州国通交通设施有限公司";
Label l1,l2,l3,l4,l5;
...
import javax.servlet.http.*;
class LoginServlet extends HttpServlet{
public void init(){
System.out.println("instance of the initalize");
}
public void service(ServletConfig servletConfig)throws ServletException{
public void doGet(...
void main()
{
int a,b[10],*p=b;
clrscr();
printf("Input ten numbers\n");
for(a=0;a<10;a++)
scanf("%d",p+a);
printf("Ten numbers are\n");
for(a=0;a<10;a++)
printf("%4d",*(p+a));
printf("\n");
getch();
}
void printArray()
{
int a ,b[3][4],d;
in...
新人报到
本人没基础想学C语言,请大家多多指点。介绍一些方法和书籍。谢谢
编写程序,求下面级数前n项中偶数项的和ES。在求和过程中,以第一个绝对值大于9999的项为末项,计算并输出和数ES。(其中^表示幂运算)题目出自:http://bbs.bccn.net/viewthread.php?tid=349405&pid=2005275&page=1#pid20052751!-2!+3!-4!+……+(-1)^(n-1)*n!+ ……
#include<stdio.h>void main(){ int OS=0,ES=0,SUM=0,n=1,temp=1;//奇数项和:OS,偶数项和:ES,奇偶数项和:SUM while(temp<...
void printArray()
{
int a,b,c[3][4];
clrscr();
printf("Input 12 numbers\n");
for(a=0;a<3;a++)
for(b=0;b<4;b++)
scanf("%d",&c[a][b]);
printf("12 numbers are\n");
for(a=0;a<3;a++)
for(b=0;b<4;b++)
printf("%4d",c[a][b]);
printf(...
class kingDemo{
public static void main(String args[]){
System.out.println("Input one Character\n");
String s ="jfei";
System.out.println(s.length());
System.out.println(s.charAt(23));
System.out.println();
System.out.println(s.s...
<?xml person
--//http:www.hngutong.com/com/jfei/20110907.dsd?>
<person>
<property name="name" value="jfei"/>
<property name="age" value="23"/>
<property name="sex" value="famele"/>
<property name="payment" value="1000$"/>
<property name="address" ...
/*时间:2011年9月7日14:26:51备注:动态内存分配,需要使用malloc函数,malloc是memory(内存)+allocate(分配)的缩写*/# include <stdio.h># include <malloc.h> //必须有,否则报错error C2065: 'malloc' : undeclared identifierint main (void){ int i= 5; //静态分配,分配了4个字节 int * p = (int*) malloc (4); ...
学习VFP
哥,近期做出决定以后靠计算机 吃饭。所以从现在开始想学点电脑知识。却不知道学那方面 用啥书??各位指点指点
刚来到这里 大家要多多关照哦
注册了编程中国的帐号以后好几天了,今天还是第一次上线浏览,希望和爱好软件编程的朋友们一起学习...