Hello,

I am using Visual Studio 2008 to program in C++. My program needs to read in a line, break it into two strings. It seems that the String Toolkit Library (StrTk) (http://www.partow.net/programming/strtk/index.html) will enable this. However, I am unable to figure out how to physically add the library files in order for the program to reference it.

Thanks in advance,
RSA

Recommended Answers

All 2 Replies

There are two ways to add a library to the program

1) #pragma comment(lib, "toolkit.lib"); Put this near the top of any *.cpp file that is in the project.

2) Select menu item Project --> Properties --> Configuration Properties --> Linker -->Input. Now add the name of the library in the "Additional Dependencies" edit control.

But I don't see why you need that library to solve your problem. Just use std::string substr() method to split the line.

You guys are awesome, thanks!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.