Thanks a lot...Will come out with C.L.O.S.E - V4 Soon

Im completely new to Regex. Could you possibly explain or link to a meaningful resource.
Please.
Thanks In Advance
Anurag

Hi guys...
guess i won't be posting after this for a long time....

could you all please help me out with syntax highlighting in c++ once again.
I have made a full featured text editor(please check the snippet C.L.O.S.E)
but could you please suggest about syntax highlighting or atleast indentation..

I have read one in csharp using RegEx.
Can we do that same here?

Please help.

Anurag

Exactly....
Most probably they may upgrade to Visual C++ or
Dev C++ which is free.

What would you want in V4?

Haha hell yeah!

Anyway.... I Dont See any delay in my prog when I use system()

Yep.. thanks...
Okay.. lets see C.L.O.S.E V4....

clrscr() and gotoxy() aren't common/recognized functs i think
(Coz i use Dev C++)

Also, a review of the program?
Suggestions
Comments.
Please

I have that itself on windows.
Can you please throw light on the topic?

Its a good game... might replace Pokemon!! :P

BGI Graphics are not supported under windows...

Hi guys,
Here's my project finally.
It's name is C.L.O.S.E - The Command Line Open Source Editor
Please review and comment.

Mention errors if any,
Also, for this code to work.
Please download open.cpp, find.cpp, new.cpp, append.cpp, compile them and place all of them including the main source in a single directory. Now compile main source and run.

Anurag.

Thanks... I've understood...

Hi guys!

I want the user to enter the day, month and year in a dd/mm/yyyy format.
But what i've written doesn't seem to work.

Code:
[CODE]char d[2];
char m[2];
char y[4];

cout << "Day:";
gets(d);
cout << "Month:";
gets(m);
cout << "Year:";
gets(y); [/CODE]

In the output, it doesn't stop for Day, Goes for month.. and suddenly program crashes at Year. Any Help?

Thanks you guys...
I've finally solved it..

Hi!
I've encountered another problem,
The code below is just the part of the code where the error occurs

int FindStr(FILE *f, char *str)
{
 int s_pos; //string position in the text
 int c_pos; //char position in the text
 char *string;
 char ccnt; //char count

 s_pos = -1;
 c_pos = 0;
 string = malloc(strlen(str));

At the last line the compiler(DEV C++)says that there is an invalid conversion from void to char....
I didn't understand the error.
Can anyone explain?
Thanks in advance

Anurag

Hey guys i patched the error all right

Here's the code. The case is solved. Thank You Nathan Oliver,abhimanpal, nbazteec!!
ON DEV C++

[CODE]// reading a text file

include <iostream>
include <fstream>
include <string>

using namespace std;

int main () {
string line;
char fname[256];
gets(fname);
ifstream myfile (fname);
if (myfile.is_open())
{
while (! myfile.eof() )
{
getline (myfile,line);
cout << line << endl;
}
myfile.close();
system("PAUSE");
}

else cout << "Unable to open file";

return 0;
}[/CODE]

Oh sorry, the program shows an output like this
(for open.cpp)
#
i
n
c
l
u
d
e
......

I am exactly on Borland Turbo C++(sorry, i know it's obsolete, but we have to work on this itself. i suggested dev c++, but guys around here are stuck to Turbo)
And that is why I had to use "deprecated" headers

But as i use gets(), the program exits, and doesn't show me any text..

Please Explain....
I didn't understand fgets()

Hi guys,

I've compiled the code given below which allows the user to enter the address of a text file and then view it(the whole thing). But, as soon as input is taken,

"openfile.exe has encountered a problem and needs to close. Send Error Report."

When I Press Debug
something in assembly language pops up.

[CODE]#include <iostream.h>

include <fstream.h>

int main()
{
char *fname=0;
cin >> fname;
ifstream OpenFile(fname);
char ch=0;
while(!OpenFile.eof())
{
OpenFile.get(ch);
cout << ch;
}
OpenFile.close();
}[/CODE]

Can anyone please mention the error?
Constructive Suggestions Appreciated.

Cheers,
Anurag

Its all right...

Better Use A Delimiter with getline!!!

Yeah, thanks.... I will improve....
I was using primitive methods.

Sorry.... As I said Milestone 4 is on the way...

Thanks a lot abhimanipal.
and as for ketsuekiame........please...errors are made by even greatest of the great.
i do not have time that's all

and as for enter twice code,
i better suggest using a delimiter.
and as for syntax highlighting....
i better use colorer(or atleast its kernel)

Hey guys,
recently i've tried to compile this command line email program

I get the error:
cannot find -lobjc
ld returned 1 exit status

Here's my code.

Any Help Appreciated.

[CODE]

include <stdio.h>
include <stdlib.h>
include <string.h>
include <winsock.h>
define NETWORK_ERROR -1
define NETWORK_OK 0

FILE *fp;

char buffer[200000];
char buff[100];
char mess[200000];
char inserpde[100];
char mage[100];
char sndto[100];
char mesfrm[100];
char temp[200];
char tempone[200];
char *p;

char TmpStr(size_t);
char
mid (char*,int,int);

void ReportError(int, const char );
char sendmail( char
filename, char server, char to, char *from);

int main(int argc, char *argv[])
{

if (argc!=5 )
{
    printf ("\n");
    printf("Usage: Filename SmtpServer To From\n");
    printf("where:\n");
    printf("    FileName = text file containing the messsage\n");
    printf("    SmtpServer = server name e.g. smtp.domain.com\n");
    printf("    To = recipient's address e.g. myfriend@domain.com\n");
    printf("    From = sender's address e.g. me@domain.com\n");
}

else
    if(argc==5)
    {

        if((fp = fopen(argv[1], "r"))==NULL)
        {
            printf("\nCannot find %s", argv[1]);
            printf("\n\nPlease enter the full path for the file\n");
        }
        else
            if((fp = fopen(argv[1],"r"))!=NULL)
            {

                while (!feof(fp))
                {

                    strcpy(buff,"");
                    fgets(buff, sizeof(buff), fp);

                    p = strchr(buff, '\n');
                   if(p){
                    *p = '\0';
                    strcat(buff,"\r\n");
                   }
                  strcat(mess,buff);

                }
                fclose(fp);

                strcat(mess,"\r\n.\r\n");

                strcpy(mage,argv[1]);
                strcpy(inserpde,argv[2]);
                strcpy(sndto,argv[3]);
                strcpy(mesfrm,argv[4]);

                sendmail(mage, inserpde, sndto, mesfrm);
            }
    }

return 0;

}

char sendmail( char filename, char server, char to, char from)
{
strcpy(temp,"Message sent");

WORD sockVersion;
WSADATA wsaData;
int nret;

sockVersion = MAKEWORD(1, 1);
WSAStartup(sockVersion, &wsaData);
LPHOSTENT hostEntry;
hostEntry = gethostbyname(inserpde);   // This is the host’s name

if (!hostEntry)
{
    printf( "Error obtaining host\n");
    return -1;
    WSACleanup();

}

SOCKET theSocket;
theSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

if ...

Thanks,, Sky diploma.....
I owe you this one, dude.

Please hint a looping mech
im out of all of them

yeah.......thanks
I'm confused
:s

Firstly:
My program has to take multiple line input.
The delimiter is ~
Then the program should take in the word i want to search.
Finally,
if string is found, then replies exact
else error....

secondly:
They compile and run. But they don't seem to do as shown above

Help appreciated.

Anurag