Isn't there a feature in gcc where you can use main() as a overloaded function as in my code above?
Type: Posts; User: kjwilliams
Isn't there a feature in gcc where you can use main() as a overloaded function as in my code above?
If there are two versions of main() why cant I overload them in my code, when they are already overloaded as two of the same function for C++?
test1.cpp
#include <iostream>
using...
Thats all I needed to know, thanks....
I use DJGPP which uses GCC, on Windows , is the -E flag a compiler or linker flag?
Please refresh my memory.. on this...
If you have filea.c with:
#define MYVAR 91
and a fileb.h with :
Heres a good guide ( although they didn't provide a example to show it ) for strtok();
strtok - cppreference.com
Well, I got a interesting reply on comp.os.msdos.djgpp.... from someone there. He made some the same complaints about my code , as everyone did here, but he did make one suggestion that I thought I...
Well, in certain cases using the built in debugger that uses break points, as in my case , RHIDE for DJGPP has one. But GDB is better - but I am out of practice with it. But I found out what was...
I recently posted a message like this in comp.os.msdos.djgpp and I am waiting for someone there to respond to see what they say.
I think that the null pointer returned from strtok() in my...
Ok.... All of you who have been telling me my program is wrong in part or another way, again... have been right!
And I will have to , AGAIN, redesign my string_parser program.
Let me explain...
@phantomotap
C strings are neither a protocol or a type, they are arrays - as defined in the C standard
from a previous post...
w1 and w2 are both c strings that observe the standard explained as s2, which is defined in the underlined next sentence. That's how I understand it.
I want to thank everyone - for pointing out that one detail about strtok(); that I misunderstood.....
my program ( not my bigger program that will use it ) works :
here it is:
/*
...
The top statement is a char assigned the Null character
The bottom statement is a char pointer assigned to a empty char string
A C string is actually a array of characters such as :
...
Ok - using the above text , I am not seeing a difference with what I am doing in conflict with what the standard dictates. Please highlight or underline what it is that I am not following, because I...
That's what I didn't understand about the syntax of strtok(); if it required a string or a character, long ago - but I've seen it used with both and since its strange that neither my Borland or DJGPP...
Part 2 :
@ledow, et al
this is a ANSI C program that is portable so you can compile it if you wish
//re-testing parse_text for WATT
Well the way that I design code before I implement it into a larger program, is that I test it alone - in this circumstance from other function calls the way that it is set up is like this :
...
@ledow
short int string_parser(char *userstring, char *target, char magic, short int word)
{
static char subject[PARSE_SIZE_LIMIT]; subject[0] = '\0';
Well the thing is that this is not a hypothetical question, I am writing a console program using DJGPP ( a port of GCC ) for MS-DOS. For the past month, even after upgrading the compiler after the...
Let me rephrase my question...
Probably what I mean by compiler based undefined behavior is actually what is called implementation defined behavior
Lets say, not all compiler implementations...
Does compiler based undefined behavior exist, under the following
condition...
If under the circumstances a program compiled with a C compiler compiles ( compliant with the ANSI C standard )...