I run a simple test program, but a different one runs


When i try to create and run any new simple test program in c++ a different one runs.

This program that runs is actually a java program, It is stored in my computer as a java.file.

I stopped working with c++ in my machine and went with java and now i want to go
write some stuff in c++ again.

Any of my old c++ programs that i wrote before installing the java development kit and writing java still work. But any new c++ programs that i try to
create do not run, the same java program runs instead

Any idea of how to fix this?
Thanks in advance.
Maybe you need to create a new project? Just a suggestion.
This makes no sense. Can you tell us exactly what you're doing, including how you're compiling, running, etc.?
Try to move your c++ files to a different folder. Or sometimes it happens because your
c++ file isn't compiling correctly, so make sure they aren't any errors.
Ok this is exactly what i am doing.

I used to only write c++ files and compile them with quincy, i have all the CPP files in 2 folders and also their Application files and their quincy files( is this bad?).

Then i installed a Java Development kit and wrote only JAVA files.

Now i want to write c++ programs again; when i try to run any new c++ program they don't even compile and the dos window pops up showing content of a JAVA file as if i had ran that one.
And I can't even find this JAVA file, i think i deleted it.

BUT any of my old C++ programs compile and run fine.
I don;t know what other info i should give.
Java programs are run though the command
java ClassNameHere
or
java -jar JarFileHere


C++ programs are compiled to executables and are run simple with the command
YourExeFile


There should be no conflict.
Sorry everyone !!

this JAVA program actually does not exist anymore, i deleted it a long time ago,

The one executing every time is its copy but in C++, i have located its CPP file, It is in a folder with the rest of my c++ programs.

When i run this C++ program it does not compile it just runs and ends and does everything it was meant to do.

But the rest keeps happening. What do i do know?
it does not compile it just runs and ends and does everything it was meant to do.

Er... that's how it's meant to work. It's not meant to compile (itself?) every time you run it, it's supposed to compile every time you use a compiler to compile the necessary files. @.@

-Albatross
Last edited on
Allright, i am new to programming, so bare with me.

i used the word 'compile' wrong, i meant "build".

When you run a program in quincy a window pops up and says " (name of file).cpp has been modified. Build?"
[YES]
Then it builds, it takes like like a second and then it runs.

So what i meant was "building".
Last edited on
i really need help on this one.
IDE? OS?
So your compiling and running your program, and it does what it's supposed to do. What exactly is the problem?
Topic archived. No new replies allowed.