首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看C++
#include <iostream>
using namespace std;

int main(){
    
    return 0;
}
阅读全部 | hamilyjing 贴于 2025年4月11日 14:15     hide bbsi
#include <iostream>
using namespace std;

int main(){
    
    return 0;
}
阅读全部 | hamilyjing 贴于 2025年4月11日 14:15     hide bbsi
#include <stdio.h>
#define MaxSize 10
typedef struct Queue{
    int data[MaxSize];
    int head,tail;
}Queue;

void InitQueue(Queue &S){
    S.head=0;
    S.tail=0;
}

......................
阅读全部 | sdcz 贴于 2025年3月19日 23:28     hide bbsi
#include <stdio.h>
#define MaxSize 50
//创建栈以及栈的基本操作
typedef struct Stack{
    int data[MaxSize];
    int top;
}Stack;

void InitStack(Stack &S){
    S.top=0;
}

......................
阅读全部 | sdcz 贴于 2025年3月19日 23:20     hide bbsi
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
typedef struct Lnode{
    struct Lnode* next;
    char data;
}Lnode,*ListLink;

//第一种方法
/*bool match(ListLink L,int n){
    char A[n/2];Lnode *p=L;
    for(int i=0;i<=(n-1)/2;i++){p=p->next;A[i]=p->data;}
......................
阅读全部 | sdcz 贴于 2025年3月19日 00:10     hide bbsi
#include<stdlib.h>
#include<stdio.h>
#define maxsize 100
typedef struct{
    int data[maxsize];
    int length;
}List;

int SearchList(List &L,int e){
    int min =0;int max=L.length-1;int mean=(max+min)/2;
    if(L.data[min]==e){return min+1;}
    if(L.data[max]==e){return max+1;}
......................
阅读全部 | sdcz 贴于 2025年3月12日 22:55     hide bbsi
#include<stdio.h>
#include<stdlib.h>
#define Maxsize 10
typedef struct{
    int data;
    int next;
}node,ListLink[Maxsize];

int main(){
    node A[Maxsize];
    printf("sizeof(%zu)\n",sizeof(A));
    node a;
......................
阅读全部 | sdcz 贴于 2025年3月12日 21:08     hide bbsi
#include<stdio.h>
#include<stdlib.h>
typedef struct Lnode{
    int data;
    Lnode *next;
}Lnode, *ListLink;

//创建链表
bool InitList(ListLink L){
    L=(ListLink)malloc(sizeof(Lnode));
    L->next=NULL;
    return true;
......................
阅读全部 | sdcz 贴于 2025年3月12日 20:30     hide bbsi
#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct Record
{
    int sequence;
    char studentID[12];
    char name[50];
};

......................
阅读全部 | lzzz 贴于 2023年10月10日 10:59     hide bbsi
#include<bits/stdc++.h>
using namespace std;
int a[1000],b[1000],c[1000];
int main(){
string a1,a2;
cin>>a1>>a2;
int lena=a1.size(),lenb=a2.size();
for(int i=0;i<lena;i++){
a[i]=a1[lena-1-i]-'0';
}
for(int i=0;i<lenb;i++){
b[i]=a2[lenb-1-i]-'0';
......................
阅读全部 | dhm 贴于 2023年8月15日 16:44     hide bbsi
1 2 3 4 5 6 7 8 9 10 下一页