views:

253

answers:

3

hello i have a problem i use visual studio 2008, and i chose a .cpp in visual c++

at first i copied a tutorial sample

#include <stdio.h>

int main()
{
 int x=1;
 int n =1;
 printf("Wie viele Zahlen wollen sie ausgeben lassen?: ");


 for(int i=0; i < n; ++i)
 {
  x*=i; // x=x*i
  printf("%d: %d\n", i, x); 
 }

 return 0;
}

but i get an error

in german:Fehler beim Starten von "rc.exe". --> Problem by statring "rc.exe"

what did i wrong?

A: 

I don't think there is anything wrong with the code you posted. The error message you quoted would suggest that your project is set up to use resources and either the resource file isn't present or the compiler install isn't quite there.

Neither of them should make any difference to the program above. First, ensure that you've got it set as a Win32 Console executable and then make sure you don't have any resource (.rc) files around.

Timo Geusch
now i created a new (win32 console) project, just a main.cpp and .cpp/.hsame error by just using:#include <iostream>using namespace std;void main(){}
Tyzak
Have you checked if the project is set up to run the resource compiler?
Timo Geusch
A: 

at first i copied a tutorial sample

Where did you copy the code ? (what source code ?)

When you start Visual Studio 2008, you did create a project ? what kind ? or did you simply created a new file and hope be be able to compile it ?

I suggest create a new Console (Win32 Console Application) project and paste the code in the auto-magically created "main" (probably called _tmain) of the project.

I just tried it and it work (at least compile and link).

Max.

Max
from a webside, just the text.a console32, .cpp, i compiled it, same way it normaly works.i started a new project now there isn't this problem right now (but it's on an other coumpter)
Tyzak
A: 

well finally i found the solution

vs2008 installs rc.exe in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin and there the rc.exe was missing, so i had download rc.exe and put it into that folder.

now it works

Tyzak