473,387 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

problem using strtok_s

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 9741
gpraghuram
1,275 Expert 1GB
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 Expert Mod 8TB
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
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 Expert 1GB
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
thanks.
now that cleared my confusion & everything works just fine.
Oct 24 '07 #6
weaknessforcats
9,208 Expert Mod 8TB
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
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()...
4
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...
4
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...
3
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...
4
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...
2
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...
1
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...
3
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...
3
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. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.