when I put in the std:: infront of the the fstream the error changes. I wrote this code and compiled it on it's own and it all worked, now when I'm trying to merge it into some code that I downloaded it doesn't work. :confused: here's what I'm doing. std::fstream fin; fin.open(filename,ios::in | ios::nocreate); the errors I get are: odbc_stuff.cpp(30) : error C2079: 'fin' uses undefined class 'basic_fstream >' odbc_stuff.cpp(31) : error C2228: left of '.open' must have class/struct/union type odbc_stuff.cpp(31) : error C2039: 'nocreate' : is not a member of 'basic_ios >' odbc_stuff.cpp(31) : error C2065: 'nocreate' : undeclared identifier I don't get it. I thought I was doing a standard file open. :mad: ICXC NIKA
Unplugged
Posts
-
ambiguous symbol -
ambiguous symbolI'm doing the following #include then later fstream fin; and it gives me this error. C:\parsells\C++ Testing\ccode\odbc_stuff\odbc_stuff.cpp(137) : error C2872: 'fstream' : ambiguous symbol there is other code in there as well, but that is where it says the error is. :wtf: ICXC NIKA
-
Console Application with Database Connectivitybelow are the errors it gives me. Don't worry about it. I'm sick of trying to figure this out. If they want it done, they can do it themselves. :rolleyes: c:\program files\microsoft visual studio\vc98\include\sqltypes.h(114) : error C2146: syntax error : missing ';' before identifier 'SQLHWND' c:\program files\microsoft visual studio\vc98\include\sqltypes.h(114) : fatal error C1004: unexpected end of file found PointerTestMain.cpp c:\program files\microsoft visual studio\vc98\include\sqltypes.h(114) : error C2146: syntax error : missing ';' before identifier 'SQLHWND' c:\program files\microsoft visual studio\vc98\include\sqltypes.h(114) : fatal error C1004: unexpected end of file found dbconn.cpp c:\parsells\c++ testing\ddl checker db connect\dbconn.h(54) : error C2143: syntax error : missing ';' before '*' c:\parsells\c++ testing\ddl checker db connect\dbconn.h(54) : error C2501: 'DBStatement' : missing storage-class or type specifiers c:\parsells\c++ testing\ddl checker db connect\dbconn.h(54) : error C2061: syntax error : identifier 'DBStatement' c:\parsells\c++ testing\ddl checker db connect\dbconn.h(54) : error C2501: 'ExecSQL' : missing storage-class or type specifiers c:\parsells\c++ testing\ddl checker db connect\dbconn.cpp(952) : error C2511: 'ExecSQL' : overloaded member function 'class DBStatement *(const char *,class DBStatement *)' not found in 'DBConnection' c:\parsells\c++ testing\ddl checker db connect\dbconn.h(24) : see declaration of 'DBConnection' ICXC NIKA
-
Console Application with Database ConnectivityI can't get the files to compile. :~ ICXC NIKA
-
Console Application with Database ConnectivityHere is my problem. I am writting a console application and I need to connect to a database in order to either execute a stored procedure or to execute a query. Then I want to store the results into an array and use it for other purposes throughout the program. My problem is how do I connect, and how to I execute and retreive the results. I've tried using a wizard, but it creates so much code that I don't understand. :(( Is there a library that I can pull in and use it? My database is accessable via ODBC, I've tested the connection and it works. Assuming the ODBC name for the database is "Database1" and the stored procedure name is "sp1", how would I code it? :confused: ICXC NIKA
-
Accessing a Sybase Stored ProcedureI'm having some problems here. What I want to do is access a sybase stored procedure through a c++ program. The problem I'm having is, 1) adding a data source to an already existing program. (I'm using Microsoft Visual Studio). 2) how to call the stored procedure and how to acess the results. If anyone can give me any help it would be most appreciated. ICXC NIKA
-
FusionScriptHas anyone used fusionscript or installed it? ICXC NIKA
-
command lineIs there anyway that I can pass a variable into a vb program when I call it. I want to do something like vbprogram.exe textfile.txt but I don't know how to receive the variable and stuff in the vb program. :(( I know in C it's argsv. any help would be great. :-D ICXC NIKA
-
string accessthis is really stupid, but how do I access one character from a string. in C++ it looks like: stringvar[5] :-D when I try it in VB stringvar(5) :~ it says that it expects and array. but I can't declare an array of characters which is what I need. :wtf: ICXC NIKA
-
New With Visual C++any idea how I could run a sybase stored procedure from there? for example. I have an array for names. names[]. I want to pass the array into a sybase stored procedure within my database called storenames. any idea on how I could do that? ICXC NIKA
-
New With Visual C++I'm new using Visual Studio, but I have done work before using C++ on Unix based systems. Is there a site that I can go to that can give me a run through on how to write out to a database? Or even just and over all guide on how to use the visual end and database connectivity? :confused: I was able to pick my datasource and my tables and everything, but i don't know how to access or write to them. And for an added bonus the visual studio I have, is missing it's help files. :(( Any help will be great. I love the faces on here. :-D ICXC NIKA
-
Passing in Argvs in windowsIt works when I use the ms-dos command prompt. when I just go to start and run, then browse, then try to do it, it's a no go. :wtf: ICXC NIKA
-
Passing in Argvs in windowsI know this is a really stupid question, but I'm use to programming on Unix systems. I wrote a program using MS Visual C++, and I want to pass in a value into the argsv. so I can run it at the command prompt something like: "whatever.exe filename.txt" of course this doesn't work. Any ideas? :confused: ICXC NIKA