Exists somewhere a code converter???

Started by
5 comments, last by SigwarthSoft 24 years, 3 months ago
Ok hahah, stupid q #999..... I know its impossible without having the two compilers and languages and and and. What i mean is: can i somehow convert visual c code with a program into visual c++ code? I guess not but if there is, al my problems would''nt exist... Thanx in advance if anyone can answer this q... Sig
Advertisement
I''m extremely confused by your post.
What exactly do you mean by code converter?
C code should compile fine in Visual C++.
What are you trying to do?
Well hai,...
i''m trying to compile visual c source in visual c++. I get 157 errors..... I''m thinking about getting the visual c compiler...
Sig
Okay??? I have to agree with SiCrane. I still can''t figure out exactly what you are asking. C should be perfectly compilible with C++.

ALso, there''s just Visual C++. There''s not another Visual C only.
well i''m sorry. There is. Can you explain why i get more then 157 errors and someone in the usa not? He said he used vc and not vc++!
Sorry...
Sig
Well, he probably meant to use the C compiler, not the C++ compiler. In Visual C++, any file ending in .cpp or .cxx will be compiled by the C++ compiler. Any source file with an extension of .c will be compiled by the C compiler--this is what you want.

Now, the code, obviously, won''t compile under C if there are any C++ features. Like, for instance:

struct blah
{
int stuff;
};

int main(int argc, char** argv)
{
blah blahvar;
}

In C, you''ll need to replace that structure definition with something like this:

typedef struct blah_s
{
int stuff;
} blah_t;

Check for things like that if you still can''t get it working.

Good luck.
It would also help if you''d tell us some of the errors...

------------------------------
Jonathan Little
invader@hushmail.com
http://www.crosswinds.net/~uselessknowledge

This topic is closed to new replies.

Advertisement