Several beginner problems with C++

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Markstar
Posts: 4
Joined: Wed Jun 04, 2003 8:40 pm

Several beginner problems with C++

Post by Markstar »

I'm sorry I'm asking this, I spent quite some hours trying to avoid this thread but I don't know where to look anymore.
Here are my problems (mind you, I'm new at this :oops: ):

1.) I installed gcc and TextPad under Win2k (!), added the "Compile C++"-thing which looks like this:
Command: C:\Program Files\MinGW\bin\g++.exe // Of course added the dir to the PATH
Parameters: $File -o $BaseName
Initial Folder: $FileDir
Reg. expr.: ^\([^(]+\)(\([0-9]+\)):
File: 1, Line: 2

Now when I program crap (which I do all the time since I got no clue what I'm actually doing), I get the command results with the error messages.
Something like:
"C:/My Documents/Edu/test.c:2:2: warning: no newline at end of file"

Q.: What do I have to do to jump directly to the error???

2.) :!: Also added the "Run C++ File" which looks like that:
Command: C:\WINNT\system32\CMD.EXE
Parameters: /k $BaseName
Initial Folder: $FileDir
with the "Close DOS..." enabled and "Catch output" disabled.

IT STILL WON'T CLOSE, after the program is finished. I get to the usual prompt so that I have to exit by mouse or with 'exit'. :?

Q.: What am I doing wrong? (Could it be that it works like that under Win9x, but how does one get to do it on Win2k???) :?: :?: :?:

( 3.) - Didn't really search for that one: How about "programming" PHP with Textpad? is there synatx highlighting?)

Thank a lot in advance, I really tried to find out by myself, but even ppl who use TextPad couldn't help me!!!
Ed
Posts: 103
Joined: Tue Mar 04, 2003 9:09 am
Location: Devon, UK

Post by Ed »

C:/My Documents/Edu/test.c:2:2: warning: no newline at end of file
(i guess that should be \ not / - but it makes no difference)

If this is your error message, then your regular expression needs to change to
^\(..[^:]+\):\([0-9]+\):\([0-9]+\).*$

with
file 1
line 2
and column 3

then double click on the error.

...that takes care of point 1 I think. I'll have to think about the others :D
Markstar
Posts: 4
Joined: Wed Jun 04, 2003 8:40 pm

Post by Markstar »

Thanks for your answer. Unfortunately it did not cover the first point.
It still gives me the error:
"Cannot jump to item under the cursor" - no matter where I click.

And yes, of course it says
C:\My Documents\Edu\test.c:2:2: warning: no newline at end of file ,
don't know what happened with the paste.

With the new regular expressions I get for example:
C:\My Documents\Edu\test.cpp:2:parse error before `='
But nothing ever happens. :(

Anyways, thx again for at least responding. ;-)
Ed
Posts: 103
Joined: Tue Mar 04, 2003 9:09 am
Location: Devon, UK

Post by Ed »

Well, that's a different eror string from before, so try
^\(..[^:]+\):\([0-9]+\):.*$

File 1
Line 2
Markstar
Posts: 4
Joined: Wed Jun 04, 2003 8:40 pm

Post by Markstar »

Yeah, it's working!
Thanks a lot.
Now all that's left for my total satisfaction is the auto-close thing. For the time being I just wrote a small .bat so that I just have to press one letter and "enter", but of course that's not really very elegant.
Wichetael
Posts: 2
Joined: Wed Jun 04, 2003 5:44 pm
Location: Netherlands

Post by Wichetael »

The problem with Q2 is that you're not starting your own program but you're starting CMD so you need to end CMD for the actual program to end, (which is what you do by typing exit.) You need to use the /c switch instead of the /k for CMD to terminate after executing the program.

As for php programming, yes there most certainly are syntax files, you just need to create your own document class in Textpad for that and assign the syntax file to it and set coloring and other settings to your preferences.
Markstar
Posts: 4
Joined: Wed Jun 04, 2003 8:40 pm

Thanks

Post by Markstar »

Great! That works!
This is excactly how I wanted it.

I think I'll do the PHP-thing when the time comes and experiment with what I got some more. The "creating of a document class" sounds a bit scary right now, so I'll focus on that later.

Thank you guys again! :D
Post Reply