Loicus's Q&A profile
Visual C++ string to float
Hi, I have a string "4.19 X FLA" from which i want 4.19 i have used atof but that is giving me a value 4.0987876 some value like this. how do i manage this.. Regards, I don't know what's wrong with your code. try with the following snippet. It's working fine in my VC++ 2003 compiler Sample Snippet: char *s; double x; s = "4.19 X FLA"; // Your number x = atof( s ); printf( "atof test: ASCII string: %s\tfloat: %f\n", s, x ); See MSDN for more details ...Show All
.NET Development opening and reading text files
I am new to visual c# and to programming in general. While I have taken a C++ class and have and understanding of if / else, while, for, do-while, etc., I have no clue when it comes to visual c#. Does anyone have a simple application that opens a text file (where the file name and location is entered on the form) and reads the file. Anything close would be appreciated. Ultimately I need to have an application that reads the text file, line by line, and compares it with a string that will also be entered on the form. Thanks! Here's something you need to learn about the C# paradigm early on: it is very different from C++, despite the similar syntax. Your question is a perfect example of this. In C++, here's a typical way to read ...Show All
Internet Explorer Development Javascript Error In IE6
Hello all, i am facing a problem with IE6... in most of the websites i am unable to click the link. when i click the link the browser shows the java script error. And the same link is properly working in Mozilla. my client is using IE6 so i have to fix that. and same thing i am facing with hotmail inbox also. when i click on inbox it shows the javascript error. is it IE6 bug can anybody help me thks ...Show All
Visual Studio Team System HowTo: Export a database to a script
I'm running CTP5 as of this morning.... My coworker asked me how someone could export a database to a script. So I've spent some time looking around, but I haven't found a way to do it yet. I see how I can import a script but no export. Is is possible to export a table or db to a script which I could then at a later time import onto another SS2005 box Please let me know if you need more details, I'm new to VS 2005 Team Edition for DB pros. thanks. Steve Mayhugh MCSE, MCDBA, MCSA You can use the data compare tool to generate a script of the data. To do this, use data compare to compare a version of the database w/ data (source) to a version of the db w/o data (target). You will then be able to create a synchronization ...Show All
Visual C++ C++/C# InterOp and gacutil/regasm
Hello everybody, I am getting in the tough issue in my application. I hope I can get some advice from you. My application CatchAllMessages is mainly written in C++ and is used to catch messages from the internal network. I have many interfaces to display message data. But for some unlucky reason, we designed the new interface written in C# to catch a new message which has the different platform compared to messages caught in CatchAllMessages application. That's why I am using Interop to regsiter the C# DLL as the COM object. What I did was to create the DataWrapper.cpp class( in DataWrapper project ) which translates some basic data of the message, such as IPAddress and the content of the message. Then, I created the NewMessage. ...Show All
Smart Device Development Is correction memory cosumption for Object Instance.
Hi all, I have the following Class which when I create an Instance of takes up around 25KB. Is that normal. The properties are filled with ints and small strings, the Answer Collection only ever contains one instance, and the Questions Collection (m_colQuestions) contains between 1- and 30 (though rarely is it this high) of its self. public class RecNspInspectionQuestion : MCS.PocketPC.Record, ICloneable { public enum Columns { QuestionTreeUID, ParentUID, QuestionTypeUID, QuestionNodeTypeUID, ShortDescription, LongDescription, IsActive, IsRequired, Reference, SortOrder, Notes, IsSystem, AnswerSetTypeUID, End }; public int m_nQuestionTreeUID = -1; public int m_nQuestionTypeUID = -1; public QuestionNodeType m_Ques ...Show All
Visual C# What is Parsing error(CS8025)?
What is Parsing error(CS8025) What is the usual cause of it Flamethrower 5120 What does the code look like where the error occured There should be a file name and location in the file where the error is occuring. Perhaps we can help diagnose the problem if we can see the relevant code segment. ...Show All
Smart Device Development getting GPS position from HP6915 PDA
Hi, I am trying to write an app for WM5 .net CF 2.0. I am trying to communicate with the inbuilt GPSdevice. I need to retrieve just the current GPS position. What is the best way to do this any advice would be great. thanx. OpenNETCF SDF has OpenNETCF.IO.Serial assembly for GPS access: http://www.opennetcf.org/PermaLink.aspx guid=e74529b0-4447-4293-b880-03628bc7a14d ...Show All
Windows Forms The name 'InitializeComponent' does not exist in the current context
Hello!I'm creating a control library and consequently a class.Visual studio compiler is giving my followed error, when I wrote InitializeComponent(); The name 'InitializeComponent' does not exist in the current context Can anybody help me please you probably don't have the definition for the said method in your mail class. if you mail class is going to be the control/component, it should have an initializecomponent method since the designer needs it to preview your control/component. if mail is not your control/component but just another class used by the control, you should have used another code sheet for that and not edit the one generated by the wizard for your control class. ...Show All
Software Development for Windows Vista Installing SQL 2005 on Vista
Hello folks, I have just installed vista and the next step is to install other software for developing applications on vista. While trying to install SQL 2005 i get an error message which says that i dont have enough previleges to use IIS. And as a result i am not able to install an important part of SQL i.e reporting services. Anyway the problem has a solution, which is to change the local security policy : User Account control: Behavior of the elevation prompt for administrators in Admin Approval mode to "Elevate without prompting" But even after doing so i still face the same problem. Note: if i do the same thing under Admin previleges, it works fine, but i cant do that all the times. I do want to elevate the permissi ...Show All
.NET Development Trying to make Socket object be accessible in many threads
I'm trying to compile a variant of the Server and Client example programs from the book "Visual C# 2005: How to Program, Second Edition". Basically, (my variant of) the program is a form that allows the user to be either server, or client, of a very simple chat program. I'm practicing the TCP protocol in C# programs, so I'm limiting myself to text network streams. In Server mode, you can (before a connection is attempted): -modify the port -Start listening In Client mode, you can (before a connection is attempted): -modify the port -modify the target IP address -start connection attempt In server mode, while connecting, a new thread is launched and will do these things: -create and construct a TcpListener object, then call its Start() meth ...Show All
Visual C++ Turbo C Command Line
How can I disable Ansi Keywords in Command Line ...Show All
Visual Basic Is it possible to call a .net dataset from a vb 6 app.
HI, Never tried, Suppose you have a .net dll with functions returning a Dataset. Now you have a client application in vb6 using Adbo.Recorset. Is it possible to convert a dataset to an Adodb.Recordset in the way mentioned above Any issues Thanks in advance Hi, Thanks very much for your reply. I am working in a company where we have 10 years of vb6 legacy code and the managers ,who has usual know nothing about programming and they dont care whether we code in vb6 or .net 3.0,but one thing is for sure is that they dont want to invest money in converting the apps into .net ,which leaves us (developers) stuffed with old vb6. Thought about it how to migrate and came up with this: ...Show All
Visual Studio 2008 (Pre-release) Drag and Drop - How to interchange Tab Item positions
Is it possible to re-arrange tab items on a tab control using drag and drop assuming that the TabControl sits on a standard container such as a Grid Appreciate anyone's inputs on this. Can I not use the native drag-drop event handlers, properties provided by WPF against most controls such as DragEnter, DragLeave, DragOver, AllowDrop=True, GiveFeedback etc. I did try using these and against each event handler, put in some dummy code (in this case populate a textbox, just to test if the events fire) - but for some reason, none of the events appeared to fire. I am using Grid as the base container to host the controls on which I want to carry out drag-drop- is it required that for Drag-Drop events to fire, the ...Show All
Gadgets HTM page dosn't show the img
Hello, I've add some image file.jpg to my htm page, there is a problem with viewing this image as a part of htm page, I don't get what the problem is, the attribute was inserted correctly, the path is correct, the other pages that works with other imgs do not work with this one, I think the problem could be in properties of specifically this img, but I have no idea how to fix it, may someone help me with this thing Thanks Is the image "local" to your gadget, is the image going to be uploaded to the gallery If you need to get the path of an image that part of your gadget, try something like this: var imagePath = m_module.resolveUrl( 'arrow_left.gif' ); myI ...Show All
