209 Posted Topics

Member Avatar for NewOrder

Yep, wrong forum, yet I'll fix it. String input; is wrong, change to: [CODE]String input = new String();[/CODE] [QUOTE]i thought they are both the same. [/QUOTE] Do Apple's taste like Orange?

Member Avatar for NewOrder
0
86
Member Avatar for DelilahDemented

The gentlemen above me have done a great job & answered well. I'd just like to add that chars inside switches are in fact converted to their ASCII equivalent ints. :)

Member Avatar for arkoenig
0
220
Member Avatar for Chosen13

[QUOTE]Well, this project I'm working on is a Pokedex Program for my little sister for her birthday.[/QUOTE] Awww, so sweet. I used to love Pokemon. All 507 of them (not really all). [CODE] std::string line; while(std::getline(file,line)) { //Here you go. } [/CODE]

Member Avatar for nbaztec
0
133
Member Avatar for mihir.p

[URL="http://java.sun.com/docs/books/tutorial/uiswing/"]Java Swing[/URL] should be useful for you & [URL="http://www.netbeans.org/"]NetBeans [/URL]is a pretty decent IDE. Good Luck.

Member Avatar for ~s.o.s~
0
171
Member Avatar for Niner710

You can create a thread Sleep for 1 sec & terminate it. [CODE] HANDLE threadHnd; if(threadHnd=CreateThread(<ReadProc>)) { Sleep(1000); TerminateThread(threadHnd); } [/CODE]

Member Avatar for nbaztec
0
2K
Member Avatar for iamcreasy

[QUOTE]002 10103 [/QUOTE] Is the information stored in separate lines or in continuation?

Member Avatar for iamcreasy
0
341
Member Avatar for YasaminKh

[QUOTE]I know it means that i need to change of the num_as_str but i don't know how i can do it?[/QUOTE] num_as_str.c_str()

Member Avatar for nbaztec
0
185
Member Avatar for CanYouHandstand

[QUOTE]Here you will not receive wParam for WM_MOUSEWHEEL notification. lparam->MOUSEHOOKSTRUCT will contain the handle to window which will receive the mouse message corresponding to the mouse event.[/QUOTE] Wrong, 1) wParam will receive WM_MOUSEWHEEL notification 2) lparam->MOUSEHOOKSTRUCT is not a valid identity 3) MOUSEHOOKSTRUCT does not contain any handle to any …

Member Avatar for CanYouHandstand
0
2K
Member Avatar for bbman

[QUOTE]Hey, Do I add a new class file for each class, or can I do multiple (like in C#)? (I have an item.h, and an item.cpp; I'm using Visual Studio.) Cheers for the help.[/QUOTE] Didn't get you.

Member Avatar for Fbody
0
123
Member Avatar for dansnyderECE

You can just use string::[URL="http://www.daniweb.com/forums/showthread.php?p=1258924#post1258924"]getline[/URL].

Member Avatar for nbaztec
0
149
Member Avatar for dansnyderECE

[QUOTE]Is there a good way to determine the end of a a line in a text file?[/QUOTE] getline(istream,string) method should work fine.

Member Avatar for nbaztec
0
247
Member Avatar for nbaztec

Recently, I've being doing some j2me programming & everything is fine but some of my MIDlets constantly ask for permissions when performing I/O operations on files. I know this is for security purposes but is there any way I can provide a valid certificate for my MIDlet without having to …

Member Avatar for nbaztec
0
115
Member Avatar for anu07
Member Avatar for YasaminKh
Member Avatar for mod666

I'd be using fbody's class for this. [CODE]class parent { public: virtual void myFunc() = 0 ; }; class child1 : public parent { public: void myFunc(){cout<<"Do stuff";} }; class child2 : public parent { public: void myFunc(){cout<<"Do more stuff";} }; void GetInput(parent *ptr) { ptr->myFunc(); } [/CODE] So you …

Member Avatar for Fbody
0
112
Member Avatar for akand
Member Avatar for nbaztec
0
241
Member Avatar for bklearner

[QUOTE]First, why have you used a typedef? Second, you seem to have declared an object named mynode, then tried to declare things (head,temp,etc) of type mynode. Shouldn't they be type 'node'?[/QUOTE] No it's fine OP has typdef-ed node to bye mynode. Though it's uncalled for when he can just declare …

Member Avatar for Taywin
0
148
Member Avatar for Galdzor

>>So basically the only thing i have to do is to change my codes to .cpp instead? and I won't get these errors? It's worth a shot. Try & echo back. >>D:\Documents and Settings\Riikard\Desktop\Untitled1.c:1:20: [B]iostream: No such file or directory[/B] It can't find iostream. Please see your project settings. >> …

Member Avatar for nbaztec
0
110
Member Avatar for mybluehair

[QUOTE]it's that c++ is outputting WEIRD crap that makes no logic sense, doing things out of order, and just seriously screwing things up.[/QUOTE] C is WY[B]C[/B]IWYG (C stands for Code) Did you input users[i] & other data?

Member Avatar for nbaztec
0
406
Member Avatar for hqt

>> I never use API in C, can you tell me more about that You'll have to start using it then. They ease the burden off your shoulders. Follow Ancient Dragon's advice. >>I suppose you could call GetDesktopWindow() and use that handle in GDI drawing functions. GetDesktopWindow() will return only …

Member Avatar for nbaztec
0
101
Member Avatar for gameon

>>Ok it is helpful for me but i want to know that if i want to make app like antivirus, process explorer than which language should i preffer. C++.

Member Avatar for nbaztec
0
97
Member Avatar for adityats2020

[QUOTE]just copy paste the code into the quotes and add \n for line breaks[/QUOTE] [QUOTE]That will not print the code as it is, will it?[/QUOTE] Define "as it is". If you meant as you typed then yes, it will. If however you meant the very code you wrote, I don't …

Member Avatar for nbaztec
0
126
Member Avatar for vbx_wx

I highly recommend you use read & write methods to store these data. It will easier for your. [CODE] YourStruct Obj; fstream file("test.txt",ios::in); file.read((char*)&Obj,sizeof(YourStruct)); [/CODE]

Member Avatar for Radical Edward
0
130
Member Avatar for anita_jojo20

The process of creating a code happens much before you hit the compiler, my friend. First lay it out neat in your mind, then type it down using the language of your choice. :)

Member Avatar for griswolf
0
183
Member Avatar for bubacke

[QUOTE] Could you try if(v.size()>2 && v[2]==3)[/QUOTE] This will produce an error *again* if size of v is less than 2, as the condition(v[2]==3) will be processed anyway. The only way I can think of now is: [CODE] if((v.size()>2)?v[2]==3:false) [/CODE]

Member Avatar for bubacke
0
132
Member Avatar for macla

[CODE] ofstream test("Test.htm"); test.close(); char path[MAX_PATH+1]; FindExecutable("Test.htm",NULL,path); //Include <windows.h> remove(test); [/CODE] That ought to do it.

Member Avatar for nbaztec
0
51
Member Avatar for rapids79

[CODE]while( !feof( at_mmi )) // Check for End of File { fgets(read,100,at_mmi); . .[/CODE] You should use: [CODE]while( fgets(read,100,at_mmi);) // Read till available [/CODE] This code worked fine for me. [CODE] char read[]="apple;mango"; char delim[]=";"; char *result; char read_MMI[40],read_AT[40]; result = strtok(read, delim); // Read the AT Command part from …

Member Avatar for nbaztec
0
184
Member Avatar for iamcreasy
Member Avatar for cmsc

[QUOTE]weird characters appear. I don't know how it's called[/QUOTE] It's called garbage value. [CODE]fn = strtok(NULL, tmp);//taken from file tempo->mName.fname = fn;[/CODE] Are you successful in retrieving the values from file into tmp?

Member Avatar for cmsc
0
91
Member Avatar for whattever

[QUOTE]i dont know.. i just copy from the text book, i dont learn programing from basic, please help me banfa,!!![/QUOTE] You sound desperate. Please note that even if Banfa gives you the solution to it, you still won't get it AT ALL, because you won't be knowing what he is …

Member Avatar for nbaztec
0
503
Member Avatar for maney

[QUOTE]If u want to update or append to a text file using fopen function call, u can use both "a" and "a+" access modes. For binary an additional "b" character has to be included in the mode string (i.e ab and ab+ or a+b). Mode a : Appends to a …

Member Avatar for nbaztec
0
107
Member Avatar for iamcreasy
Member Avatar for vijayan121
0
763
Member Avatar for Griff0527

If the array is sorted, you can pretty much use the 2-D array technique efficiently. If not, it's as good as scanning the array for every index & counting it. [CODE] //This is when array is unsorted. int countArray(int *arr, int size) { int count for(int i=0; i<size;i++) { count=0; …

Member Avatar for NathanOliver
0
1K
Member Avatar for avarionist

Your function does not raise to power instead multiplies x & y. [CODE]z=x*y[/CODE] * is a Multiplication operator *here*. Hint: To raise a power say 2^3, We multiply 2 thrice 2x2x2.

Member Avatar for avarionist
0
130
Member Avatar for FudgeCoder

[CODE]n = random();[/CODE] If your using this, make sure to call [B]randomize();[/B] before it.

Member Avatar for nbaztec
0
84
Member Avatar for gomezfx

[CODE]operator + (const money rhs) const;[/CODE] class objects should generally be passed as reference. Use: [CODE]operator + (const money &rhs) const;[/CODE]

Member Avatar for nbaztec
0
92
Member Avatar for strwbry.coder

Create a class Users having objects "userName" & "passWord" & use funtions to write into a file in binary using read() & write(). It should be a cake walk.

Member Avatar for mrnutty
0
202
Member Avatar for Jbvo

[QUOTE]I am having problems making it use the cost as the weight when determining the shortest path and adding up the miles. It doesn't associate the right cost with the different paths.[/QUOTE] Didn't quite get you back there.

Member Avatar for nbaztec
0
95
Member Avatar for jsw24ua

As Dave suggested [COLOR="Green"]vector<string> myContainer;[/COLOR] is the right(read: safe) way to go; not that yours is wrong. Can you post some sample output to explain your problem further?

Member Avatar for jsw24ua
0
175
Member Avatar for j_kathiresan

Here, I'll post some pseudo-code for you: [CODE] boolean boolFTX=false; //Flag for your FTX+AAA while(Read Line) { if(string.indexOf("FTX+AAA")>0) { if(boolFTX) //Concat Strings else { boolFTX=true; //Read Normally } else //Read Normally } [/CODE]

Member Avatar for nbaztec
0
168
Member Avatar for andrewll2

[QUOTE]//here the program should execute the code from the dll , but i don't have any idea ,how to do that :([/QUOTE] [QUOTE]In the dll i need to determine which key was pressed, but i have no idea ,how could i do that[/QUOTE] Which one is your exact question? From …

Member Avatar for andrewll2
0
221
Member Avatar for NewOrder

If you are coding it with TurboC++, a 16-bit compiler, int is by default "short int" (size: 2bytes) So make it at least [B]unsigned long[/B] to stay within the limits of INT_MAX. Edit: [CODE]System.out.println(count+n1);[/CODE] I guess it's VC++. [QUOTE]the numbers need to be octagon type[/QUOTE] First, it's Octal. I don't …

Member Avatar for NewOrder
0
163
Member Avatar for god_like

[QUOTE]but if you have any question tell me it.[/QUOTE] As a matter of fact I do. What's your original question? And what's up with the atrocious explanation. I see the code is in another language (German, I guess.), please provide some comments in English. Why are you including "header.h" multiple …

Member Avatar for god_like
0
129
Member Avatar for 143wena

Start by learning SQL. There have been many posts regarding SQL-ODBC-C interfacing. Search them.

Member Avatar for nbaztec
0
123
Member Avatar for Finconizer

[QUOTE]Edward can't help but think of malware when program requirements include words like "secretly".[/QUOTE] Nisheeth echoes with Ed. :P

Member Avatar for nbaztec
0
148
Member Avatar for kiwimoosical

[QUOTE]HELPP!!!!!!!![/QUOTE][QUOTE]Ok, so im having a [COLOR="Red"]little bit[/COLOR] of trouble[/QUOTE] Irony? [QUOTE]That line makes no sense. If you look at the documentation you will see that get() returns an istream object so using the right shift operator on that return value makes as much sense as mud.[/QUOTE] cin.get() returns an int …

Member Avatar for Ancient Dragon
0
230
Member Avatar for adcodingmaster

[QUOTE]The compiler generates it.[/QUOTE] What! Please do not answer if you [URL="http://logix4u.net/Programming/vc++/A_Tutorial_on_creating_DLLs_with_VC++.html"]DO NOT[/URL] know. You have to create a dlls separately. A dll is not a regular file. It is a library of functions which you can later import depending upon your requirement in your cpp file.

Member Avatar for adcodingmaster
0
171
Member Avatar for memstick
Member Avatar for iqra123

[QUOTE]but i want to send all 4 (days, hrs,min, sec) to client.[/QUOTE] Make a data packet & send. It shouldn't be difficult at all.

Member Avatar for nbaztec
0
88
Member Avatar for aianne

[CODE]if(graphresult()!=grOk){[B][COLOR="Red"]exit(1)[/COLOR][/B];}[/CODE] This is the cause. graphresult() fails. P.S. @OP: How come nobody before noticed it? Because the formatting was bad. Format your code nicely & bugs will come out faster. :)

Member Avatar for Adak
0
313

The End.