Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old December 7th, 2007, 04:49 AM
Buddy_99 Buddy_99 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 28 Buddy_99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 46 m 18 sec
Reputation Power: 0
MS Visual C++ not recognising headers

PHP Code:
// Time_Temp_Test.cpp : Defines the entry point for the console application.
//

#include <stdio.h>
#include <time.h>
#include "stdafx.h"

int _tmain(int argc_TCHARargv[])
{
    
time_t rawtime;
  
struct tm timeinfo;

  
time ( &rawtime );
  
timeinfo localtime ( &rawtime );
  
printf "Current local time and date: %s"asctime (timeinfo) );
  
  return 
0;


Compiling...
Time_Temp_Test.cpp
Time_Temp_Test.cpp(13) : error C3861: 'time': identifier not found, even with argument-dependent lookup
Time_Temp_Test.cpp(14) : error C3861: 'localtime': identifier not found, even with argument-dependent lookup
Time_Temp_Test.cpp(15) : error C3861: 'asctime': identifier not found, even with argument-dependent lookup


Am F'd by the compiler failing to recognize the time and date functions. Is there something about MS Visual C++ which makes this difficult. I have the same code in other compilers and no probs. Any help appreciated.

Reply With Quote
  #2  
Old December 11th, 2007, 07:04 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information
 
Join Date: Sep 2004
Location: Israel
Posts: 29,262 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587728 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 32 m 33 sec
Reputation Power: 2509
try have the #include "stdafx.h" as the first line, I remember
having some issues when it wasn't first line.

Reply With Quote
  #3  
Old December 11th, 2007, 05:40 PM
Buddy_99 Buddy_99 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 28 Buddy_99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 46 m 18 sec
Reputation Power: 0
Quote:
Originally Posted by Shadow Wizard
try have the #include "stdafx.h" as the first line, I remember
having some issues when it wasn't first line.


Thanks shemzilla. Often wondered about that and will keep it first, but found problem which approaches a bug in the way the project dialog works.

The problem was Visual Studio was creating project files to use pre-compiled headers.

However, the version of XP I was using did not have the control time language for dot Net.

I think this resulted in the option to use pre-compiled headers, always being turn on, with the option to turn off, never appearing in the dialog box.

When I ran the project on an XP system with a full installation of dot Net, the problem became apparent.

I'm not familiar with all the options in MS VC++ and this was a real trap.

Last edited by Buddy_99 : December 13th, 2007 at 11:45 PM. Reason: Make clearer

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > MS Visual C++ not recognising headers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek