868 Posted Topics
Re: change [inlinecode] readLogFile()[/inlinecode] so that you can pass the filename into it. [inlinecode] readLogFile( const char* filename)[/inlinecode] then you can call [inlinecode]readLogFile [/inlinecode]for any file you want. [code] readLogFile("file1.txt"); readLogFile("file2.txt");[/code] | |
Re: It is not that new actually. [URL]http://www.daniweb.com/techtalkforums/thread16047.html[/URL] [url]http://www.daniweb.com/blogs/entry130.html[/url] | |
Re: [url]http://www.daniweb.com/techtalkforums/post232377.html#post232377[/url] | |
Re: [quote=saqib;257849]please give me some sugestions and ideas bout that and i need to know how to declear chareters and how to take inputs of characters saqib.[/quote] How about buying a C/C++ book, or taking a C/C++ class or reading a [URL="http://www.cprogramming.com/tutorial.html"]C/C++ tutorial[/URL]? | |
Re: [QUOTE=happygeek]That will be mikeandike22 methinks...[/QUOTE] that will be you methinks... | |
Re: [quote=nanodano;257882]I think one solution is to use getline and put it into a strstream and maybe extract the values one at a time from the stream. This way I can separate it by lines. [/quote] Yes that is the best way to do it [quote=nanodano;257882]The problem is I want to … | |
Re: What were the compile errors? Give the error messages and the lines where the error occured. Don't give the line numbers. We can't count. | |
Re: I guess you should take a look at [URL="http://www.joelonsoftware.com/design/1stDraft/03.html"]this[/URL] if you already haven't. | |
Re: Not sure whether it would work for TurboC and the old command.com shell, but you could try creating the command using double quotes to handle filenames with spaces. Don't know what will happen for long file names though. e.g. [code]copy [B][COLOR=Red]"[/COLOR][/B]c:\yserver.txt[B][COLOR=Red]"[/COLOR][/B] [B][COLOR=Red]"[/COLOR][/B]c:\documents and settings\luffy-san\desktop\tcp1241_assignment3\lecture notes\server.txt[B][COLOR=Red]"[/COLOR][/B][/code] | |
Re: Yes. We understand what you mean. But where do you have the problem? | |
Re: Okay. So microsoft hasn't compiled that code before submitting. Now what about whether it serves as a good example for [inlinecode]_localtime64_s[/inlinecode]? That is it's main objective isn't it? Once a programmer tries out the example and finds that [inlinecode]exit()[/inlinecode] isn't defined, he will add the [inlinecode]stdlib[/inlinecode] line and get it … | |
Re: [QUOTE]1>LINK : fatal error LNK1104: cannot open file 'odbc32.lib'[/QUOTE]This means that the linker cant find this library file. Set the library files path of Visual studio to the folder that this is in. Most probably that folder will be the Lib directory of the Platform SDK installation. | |
Re: This fellow has created some of the worst threads I have ever seen. Looks like it was made only to ridicule this community. It at least calls for a close for all threads. If all of you who have answered in these threads (sos, WaltP, andor, iamthwee, Ancient Dragon ) … | |
Re: Just put [inlinecode]#include <iostream>[/inlinecode] after the [inlinecode]#include "stdafx.h"[/inlinecode] line. It would be better if you select the "Create Empty Project" option and then start from scratch. That gives you a better feel of things going on rather than using a template. [edit] as dave said you need the [inlinecode]using namespace … | |
Re: Well, if you want you can disable it. Windows can be customized a lot you know. | |
Re: [quote=darrenw89;249591]even still, what a legend! he had so much passion for what he did, and his poor kids, one day his wife will have the hard task of explaining to them what happened, as he was filming at the time - someone somewhere must have it on tape, not that … | |
| |
Re: [quote][B][/B]Jul 20th 2005, 3:46 am[/quote] Better late than never, eh Davey? ;) | |
Re: What have you tried so far? Why don't you modify the example shown [URL="http://www.cppreference.com/stdstring/strtok.html"]here[/URL]? | |
Re: Fate of a Man - Mikhail Sholokhov (Short Story) The First Teacher - Chingiz Aitmatov The Cigarette Sellers of Three Crosses Square[B] - [/B]Joseph Ziemian The Godfather - Mario Puzo Christine - Stephen King Bag of Bones - Stephen King ( This was the book that got me hooked to … | |
Re: Why have you declared [inlinecode]a[/inlinecode] as [inlinecode]float [/inlinecode]if you want to take the operator ie [INLINECODE]+[/INLINECODE][INLINECODE]-[/INLINECODE][INLINECODE]*[/INLINECODE][INLINECODE]/[/INLINECODE] ? You should declare it as [inlinecode]char[/inlinecode]. Also, if a is the operator what is the meaning of [inlinecode]a-b[/inlinecode], [inlinecode]a-c[/inlinecode], [inlinecode]a*d[/inlinecode], and [inlinecode]a/e[/inlinecode]? Looks like you dont have a clear idea of what to … | |
Re: Yes. That is all you need to start coding. But If you are a beginner, first try the [URL="http://msdn.microsoft.com/vstudio/express/visualc/"]Visual studio express edition[/URL], which can be downloaded for free. | |
Re: [quote=lakshmi.1987;253401]and i am restricted to use either C or C++ only...no GUI...[/quote] Give us an example on how this text editor should look like. Is it something like notepad in windows or like the old command line edit program in windows? | |
Re: Simple. Just use nested for loops. [code] bool x1[2] = {true, false} bool x2[2] = {true, false} for ( i = 0 ; i < 1; i++ ) for ( j = 0 ; j < 1; j++ ) print x1[i], x2[j];[/code] will print the answer for two variables. Expand … | |
Re: You have to include it in the resource .rc file and the resource.h file like this. Assume the icon file is iconfile.ico resource.h: [inlinecode] #define IDC_CURSOR1 1001[/inlinecode] resource.rc: [code]#include "resource.h" IDC_CURSOR1 ICON "iconfile.ico"[/code] Then you have to compile it using the rc.exe which is included in the platform sdk bin … | |
Re: For chat I use WLM only. None of my friends have an AIM account, and I like the interface of WLM very much. Nobody I know chats in Google chat either. Since I don't use yahoo messenger, contacts who do are missing a lot. :cheesy: For important email, I use … | |
Re: Change the registry key value for [code]HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper[/code] | |
Re: To amano. When you are posting bulk code, please use only [CODE][/CODE] tags. Thank you. | |
Re: This belongs in the Web Design forum. I am moving it. | |
I have an options file of the following format [code] option1 = value1 option2 = value2 ..... ; variable number of options ..... page_size= pagesize1 ;Note there is no space between page_size and = page_size= pagesize2 page_size= pagesize3 [/code] During a regression test I want to extract the values for … | |
Re: Just do it like this. int* array = (int*)calloc( 256, 256 * sizeof( int )); | |
Re: Can you do something like this in the [B]WM_SIZE[/B] event and tell me what happens? [code] case WM_SIZE: { RECT rectTreeView, rectStatus, rectTool; UINT uToolHeight, uStatusHeight, uClientAlreaHeight; SendMessage(hwndToolBar, TB_AUTOSIZE, 0, 0); SendMessage(hwndStatusBar, WM_SIZE, 0, 0); GetClientRect(hWnd, &rectTreeView); GetWindowRect(hwndStatusBar, &rectStatus); GetWindowRect(hwndToolBar, &rectTool); uToolHeight = rectTool.bottom - rectTool.top; uStatusHeight = rectStatus.bottom - … | |
Re: Well I like the tool tips. But when I click over the link, a rather odd outline of a square shows up. It is a bit disturbing. | |
Re: [quote=~s.o.s~;251339]What are u exactly trying to prove Mr. Lerner. First you say there is no straightforward way to do it and ask the OP to use an external library. And when the solution is posted you say that even a ten year old kid could do it ???[/quote] I think … | |
Re: Yeah. You have real guts. Sounds like you are going through a phase our own [URL="http://www.daniweb.com/techtalkforums/member67225.html"]Davey [/URL]went through some years back. We sure will give any help you need in your C++ studies. Welcome. | |
Seen this issue for sometime. When I initially open the C/C++ page from my bookmark, the online indicator does not show it's green color. After refreshing the page or viewing a thread or do something with the webpage, the online indication button turns green. Image Attached | |
Re: post your program first. We don't just hand over source code for students expecting a quick solution and get a good grade. Or you can [URL="http://www.daniweb.com/techtalkforums/www.google.com"]google[/URL] yourself for source code. | |
Re: [code]aObj = "string2";[/code]This line is wrong. The arguments of that assignment operator statement is a const char*. But you haven't defined a =operator that takes a constant char* as it's argument. Declare something like this and it should be okay. [code] class aClass { public: aClass() { this->aString = new … | |
Re: [quote=Natrius;249280] [B]1.[/B] I'm making a program with a default constructor and an overloaded constructor. They're both called by different rules and produces a testline of text when called. The assignment is to give the overloaded constructor default arguments to see what happens. I wonder, what is a default argument i … | |
Re: davey he has already got a [URL="http://www.daniweb.com/techtalkforums/thread54384.html"]thread[/URL] in the tech forum. I am following it up. but he didn't a reply since yesterday. don't know if it worked. | |
Re: Please post your question outside code tags. I corrected your first two posts, do this one yourself, or I will delete this thread. Since it has been only 2 minutes since your post, you can edit it now. | |
Re: Create a local variable called a. Otherwise your global variables won't be hidden inside main. [code] #include "stdafx.h" #include <iostream> using namespace std; int a=10; void main() { int a=20; cout<<a<<endl; cout<<::a<<endl; }[/code] | |
Re: This is not a problem of the laptop manufacturer. What is the Operating System? What are the applications for which you are trying to save usernames and passwords? | |
Re: You need some kind of operator between these brackets. Probably the multiplication operator. [inlinecode](a)(b)[/inlinecode] doesnt mean [inlinecode]a * b[/inlinecode] like in algebra. [code] score=(min_average-(100-weight[COLOR=Red])([/COLOR]currentaverage/100)+(100/weight));[/code] | |
Re: Because if you are allowed to do so, creating one variable of that type will go on creating nested variables inside it and eat all available memory. | |
Re: If you are sure that the string is in double conversible format like 1.2e-2, grunt's method is the eaisest. But if you want to check the input string if it can be converted as double, e.g 123abc will be converted as 123 in grunt's method. For easier error checking better … | |
Re: I am not too sure if this is the correct forum either. The most appropriate IMHO is the [URL="http://www.daniweb.com/techtalkforums/forum125.html"]Assembly Forum[/URL] or the support forum of the manufacturer (if any). If you want this thread moved to the Assembly forum, reply in the affirmative in this thread, and a moderator will … | |
Re: What is a state transition diagram? |
The End.