Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C Windows
frndz i made my own string.h 18 functions but now problem is that i want to include my own header file like mjk.h
i have uploaded them here
 
http://ge.tt/4New76Z/v/0?c[^]
 
or u can see the codes here but that would be difficult for me. please help
 
here are the codes :
#include<stdio.h>
#include<conio.h>
#include<string.h>
 
char* mjkchr(char [],char [],char);
void main()
{  char f[20];
    char e[10],b;
  puts("Enter your string:");
    gets(e);
    printf("\n Enter character:");
    scanf("%c",&b);
    mjkchr(f,e,b);
    printf("\n Your mjkchr function output: %s",f);
    getch();
}
char* mjkchr(char f[20],char a[10],char c)
{
 
    int i,j=0,k=0;
    for(i=0;a[i]!='\0';i++)
    {
        //if(a[i]!='\0')

 
            if(a[i]==c)
            {
                j=2;
            }
            if(j==2)
            {
                f[k]=a[i];
                k++;
            }
        }
 
            f[k]='\0';
 
                return f;
 

 
}
#include<stdio.h>
#include<conio.h>
#include<string.h>
int mjkcmpi(char[],char [],int);
void main()
{
    char a[20],b[20];
    int m,ab;
    printf("\n Enter string:");
    gets(a);
    puts("\n Enter string to compare:");
    gets(b);
    printf("\n Enter N#:");
    scanf("%d",&ab);
    m=mjkcmpi(a,b,ab);
    printf("\n ASCII Difference= %d",m);
    getch();
}
int mjkcmpi(char c[20],char d[20],int ab)
{
    int i,j=0,k,l,x;
    for(i=0;c[i]!='\0'&&d[i]!='\0'&&i<ab;i++)
    {
    if(c[i]+32==d[i]||c[i]-32==d[i]||c[i]==d[i]||d[i]+32==c[i]||d[i]-32==c[i])
        //if(c[i]==d[i]||c[i]==d[i]+32||c[i]==d[i]-32 )
        {
            x=0;
 
        }
        else if(c[i]>d[i]&&c[i]!=d[i]&&c[i]>
#include<stdio.h>
#include<conio.h>
#include<string.h>
char *mjkdup(char[],char[],char *);
void main()
{
char a[10],b[10],*c;
puts("Enter Your String:");
gets(a);
mjkdup(a,b,c);
printf("\n your Duplicated String: %s",mjkdup(a,b,c));
getch();
}
char *mjkdup(char e[10],char f[10],char *g)
{
/* Aur sir ic ka ek aur method bi ha jis me sirf ek array aur ek pointer ki zarorat hni ha
char mjkdup(char c[10],char *d)
{ d=c;
return d;
}
*/
        strcpy(f,e);
            g=f;
 
    return g;
}
 
here is 3 or 4 programs can u guyz plz make me a small header file as an example so that i can modify it and add all my remaining functions .. thank you
Posted 21-Feb-13 9:39am
jahanxb327
Edited 21-Feb-13 9:52am
v2
Comments
Sergey Alexandrovich Kryukov at 21-Feb-13 15:41pm
   
Not a question.
—SA
jahanxb at 21-Feb-13 15:42pm
   
well sir it's a also a question that how can i make my own header file and in the files their is also notok folder which has my header file , that has errors :(
joshrduncan2012 at 21-Feb-13 16:02pm
   
I agree with SA. This is not a question. We do not take orders from people. We will, however, help you with any issues you might be having if you show us where the issues are in your code with detailed error messages.
ThePhantomUpvoter at 21-Feb-13 17:56pm
   
So your "question" boils down to "How do I create a header file?"
CHill60 at 21-Feb-13 18:37pm
   
I'm with SA on this ... not a question. And please please PLEASE... stop with "text speak"... u = You; plz = please; frndz = friends (I think!) - @SA ... not often we agree hey .. but on these occasions :-). @OP To create your own header file open NotePad.exe, type in your requirements, save the file as SomeMeaningfulNameToYou.h in your project folder
enhzflep at 21-Feb-13 21:26pm
   
Jahanxb, why don't you read this?
You should take note of what it says:
 
A few friendly tips
You're welcome. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 430
1 CHill60 410
2 Sergey Alexandrovich Kryukov 394
3 PIEBALDconsult 245
4 BillWoodruff 220


Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 21 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100