Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to detect a laptop lid is closed? Pin
Amarelia12-Jan-06 4:24
Amarelia12-Jan-06 4:24 
AnswerRe: How to detect a laptop lid is closed? Pin
FarPointer12-Jan-06 4:58
FarPointer12-Jan-06 4:58 
AnswerRe: How to detect a laptop lid is closed? Pin
Michael Dunn12-Jan-06 6:46
sitebuilderMichael Dunn12-Jan-06 6:46 
GeneralRe: How to detect a laptop lid is closed? Pin
Maximilien12-Jan-06 7:10
Maximilien12-Jan-06 7:10 
JokeRe: How to detect a laptop lid is closed? Pin
Rage12-Jan-06 7:11
professionalRage12-Jan-06 7:11 
GeneralRe: How to detect a laptop lid is closed? Pin
Gary R. Wheeler12-Jan-06 12:10
Gary R. Wheeler12-Jan-06 12:10 
GeneralRe: How to detect a laptop lid is closed? Pin
Amarelia12-Jan-06 18:08
Amarelia12-Jan-06 18:08 
QuestionHow to build a function in different file Pin
Pierre,Hsieh12-Jan-06 3:54
Pierre,Hsieh12-Jan-06 3:54 
I use visual c++ 6.0 enviorment. The primary file which contain main() is 555.cpp. I also wrote two functions in r.h and r.cpp. I want to call these two functions in 555.cpp. However, it always show some errors. Is there anyone who can teach me how to fix this problem? Thanks

***error message***
Compiling...
555.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\555\555.cpp(12) : error C2065: 'AA' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\555\555.cpp(13) : error C2065: 'BB' : undeclared identifier
r.cpp
c:\program files\microsoft visual studio\myprojects\111\r.cpp(21) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Generating Code...
Error executing cl.exe.

555.exe - 3 error(s), 0 warning(s)

***555.cpp***
#include "stdafx.h"
#include "r.h"
#include <iostream>
#include <cmath>
using namespace std;

int main(int argc, char* argv[])
{
double a=AA();
double b=BB();
cout << a;
cout << b;
return 0;
}

***r.h***
#ifndef RANDOM1_H
#define RANDOM1_H

double AA();
double BB();

#endif

***r.cpp***
//test
#include <cstdlib>
#include <cmath>
#include "r.h"

// the basic math functions should be in namespace
// std but aren't in VCPP6
#if !defined(_MSC_VER)
using namespace std;
#endif

double AA()
{
return 3.3;
}

double BB()
{
return 4.4;
}
AnswerRe: How to build a function in different file Pin
Vipin Aravind12-Jan-06 4:08
Vipin Aravind12-Jan-06 4:08 
QuestionHow to change resource of exported class from a DLL? Pin
jahfer12-Jan-06 1:31
jahfer12-Jan-06 1:31 
AnswerRe: How to change resource of exported class from a DLL? Pin
Michael Dunn12-Jan-06 6:49
sitebuilderMichael Dunn12-Jan-06 6:49 
QuestionHow to determine network cable unplugged? Pin
Amarelia12-Jan-06 0:44
Amarelia12-Jan-06 0:44 
AnswerRe: How to determine network cable unplugged? Pin
ThatsAlok12-Jan-06 1:35
ThatsAlok12-Jan-06 1:35 
GeneralRe: How to determine network cable unplugged? Pin
Amarelia12-Jan-06 3:01
Amarelia12-Jan-06 3:01 
GeneralRe: How to determine network cable unplugged? Pin
ThatsAlok12-Jan-06 17:21
ThatsAlok12-Jan-06 17:21 
QuestionGetting Font information Pin
<color>Aljechin 11-Jan-06 23:42
<color>Aljechin 11-Jan-06 23:42 
AnswerRe: Getting Font information Pin
Owner drawn11-Jan-06 23:47
Owner drawn11-Jan-06 23:47 
GeneralRe: Getting Font information Pin
<color>Aljechin 12-Jan-06 0:02
<color>Aljechin 12-Jan-06 0:02 
GeneralRe: Getting Font information Pin
Owner drawn12-Jan-06 0:05
Owner drawn12-Jan-06 0:05 
JokeRe: Getting Font information Pin
ThatsAlok12-Jan-06 1:49
ThatsAlok12-Jan-06 1:49 
GeneralRe: Getting Font information Pin
Owner drawn12-Jan-06 17:29
Owner drawn12-Jan-06 17:29 
QuestionCustom menu Pin
Nishad S11-Jan-06 23:40
Nishad S11-Jan-06 23:40 
AnswerRe: Custom menu Pin
Vipin Aravind12-Jan-06 1:40
Vipin Aravind12-Jan-06 1:40 
QuestionA function pointer problem... Pin
Owner drawn11-Jan-06 23:33
Owner drawn11-Jan-06 23:33 
AnswerRe: A function pointer problem... Pin
Prakash Nadar11-Jan-06 23:38
Prakash Nadar11-Jan-06 23:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.