473,659 Members | 3,631 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem using strtok_s

7 New Member
I was using Visual C++ 6.0, where strtok worked quite fine.
But now i've been asked to use VS 2005 & i desperately need to use strtok_s. But during compilation, error is shown as 'strtok_s': identifier not found. i am comparatively new to VS 2005.

could anyone please help me.
Oct 23 '07 #1
6 9777
gpraghuram
1,275 Recognized Expert Top Contributor
I was using Visual C++ 6.0, where strtok worked quite fine.
But now i've been asked to use VS 2005 & i desperately need to use strtok_s. But during compilation, error is shown as 'strtok_s': identifier not found. i am comparatively new to VS 2005.

could anyone please help me.
strtok_s is thread safe version of strtok supported by POSIX.
I dont know Microsoft VS supports the same
Raghuram
Oct 23 '07 #2
weaknessforcats
9,208 Recognized Expert Moderator Expert
strtok_s should be declared in string.h in Visual Studio.NET 2005.

I tried it on my mine and it works fine.
Oct 23 '07 #3
cath8024
7 New Member
thanks for the reply.
when i included #include <string> instead of #include <string.h>,
the problem is solved.
what is the difference between the files string and string.h
Oct 24 '07 #4
gpraghuram
1,275 Recognized Expert Top Contributor
thanks for the reply.
when i included #include <string> instead of #include <string.h>,
the problem is solved.
what is the difference between the files string and string.h

#include<string > is the c++ header file while string.h is the c header file.

c++ version of string has a string class in it.

Other members please add to this

Raghuram
Oct 24 '07 #5
cath8024
7 New Member
thanks.
now that cleared my confusion & everything works just fine.
Oct 24 '07 #6
weaknessforcats
9,208 Recognized Expert Moderator Expert
c++ version of string has a string class in it.
Not quite. The C++ version of the C header <string.h> is <cstring>.

The C++ <string> header is strictly a C++ Standard Library header. There are no C string functions in there. Secure or otherwise.
Oct 24 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2896
by: André Gasser | last post by:
hello newsgroup, I just discovered a weird effect in my php code. here is the flow of my code: 1. upload jepg file to server 2. create new (empty) jpeg file using imagecreatefromjpeg() function 3. use imagecopyresampled to resize src image and store in newly created image from step 2.
4
4456
by: bmiras | last post by:
I've got a problem using urllib2 to get a web page. I'm going through a proxy using user/password authentification and i'm trying to get a page asking for a HTTP authentification. And I'm using python 2.3 Here is an exemple of the piece of code I use: import urllib2 #Proxy handler proxy_handler = urllib2.ProxyHandler({"http" :
4
6035
by: Derek Timothy | last post by:
Hi folks I have strange problem using cmd.exe from asp code I am trying to save the results of an FTP command into a text file. When I run this command from the command line of the web server it creates the text file OK and it contains the results of the FTP commands. ftp.exe -s:test.ftp > c:\tempfile.txt However when I run it from asp using cmd.exe, it creates the file c:\tempfile.txt but there is nothing in it.
3
2699
by: Jacky Zhu | last post by:
Hi all, I am having a problem trying to consume a webservice that is developed on ..Net. I can access it without any problem using a .net client, but when I use a java client (based on Axis 1.1), some methods work, some don't. The error message I got is "org.apache.axis.types.URI$MalformedURIException: No scheme found in URI..."
4
6339
by: Dani | last post by:
Hi everyone Description of the problem: Using a PreparedStatement to write down an integer (int) plus a timestamp for testing purposes. When read out again the integer looks very different. We found that it was shifted three Bytes to the left, i.e. 4 becomes hex 4000000 which is 67108864 in decimal base. This means that the value written and the value read sometimes do not match, which is of course inacceptable for all real world...
2
9218
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered problems doing this. I wanted to implemented a generic "Helper" class like this: /** * Helper
1
2094
by: sck10 | last post by:
Hello, I am pulling data from a SQL Server table. One field that is (varchar 4000) is used to show notes. I am using a FormView for showing and editing the data. When the form is in Item view, the text runs together. All the line breaks are missing. When I enter into Edit mode, the text is formatted as it was entered (line breaks). How can I fix this so that when in "Item" mode, the line breaks show?
3
1956
by: Franky | last post by:
Been having a problem using a treeview. Work great the first time the form containing it is entered but not the second time. Took a while to create a small sample that exhibits the problem, but here it is. Seems to have something to do with doing ShowDialog Easy to reproduce this project, simply add two forms.
3
2232
by: presencia | last post by:
Hi all, I have a problem using gdb. I am using Eclipse-CDT as a frontend, but since this problem is obviously related to the gcc compiler or the gdb itself, I have reproduced it without Eclipse. Sample Program This small program should suffice to show my problem. I have saved this file as "main.cpp". #include<vector> #include <iostream> struct I{
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8531
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7359
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2754
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.