15,300 Posted Topics

Member Avatar for The Dude
Member Avatar for The Dude
0
291
Member Avatar for lionaneesh

[URL="http://lmgtfy.com/?q=windows+tutorials"]Did you try this?[/URL] [URL="http://lmgtfy.com/?q=c%2B%2B+windows+registry+tutorial"]Or this?[/URL]

Member Avatar for limodetroit
0
112
Member Avatar for babil
Member Avatar for marcoakis

The first place to start is to improve the program's formatting. Writing the code with everyting starting on the left margin is not only ugly but very difficult to read. You might get more responses by improving the program's formatting.

Member Avatar for VernonDozier
0
146
Member Avatar for acerious

The only problem I found was line 16: you have just one colon instead of two after std. Otherwise it worked ok for me with Code::Blocks on Ubuntu.

Member Avatar for chiwawa10
0
131
Member Avatar for Spartan-S63

[URL="http://msdn.microsoft.com/en-us/library/ee461765%28VS.85%29.aspx"]Link[/URL]

Member Avatar for Ancient Dragon
0
143
Member Avatar for coding101

>> cout<<"Repeat?(y/n)"; >> cin>>ans; You need to clear out all the extra stuff in the keyboard buffer, such as the <Enter> key '\n' before continuing after that cin. Try [icode]cin.ignore();[/icode] But if you also type other characters that won't necessarily work either because it will only remove a single character. …

Member Avatar for coding101
0
113
Member Avatar for customtshirts

I don't like jeans -- never had them on my body since adulthood (wore them on the farm when I was a kid). Also don't have any tattoos.

Member Avatar for BestJewSinceJC
-7
253
Member Avatar for YeMiller

for(;;) is just one way to create an infinite loop. Another way is while(true) or while(1) After cin >> choice; you might want to add a series of if statements or a switch statement and a series of cases. [code] cin >> choice; if( choice == '4') break; else if( …

Member Avatar for YeMiller
0
169
Member Avatar for mn_minal

I didn't realize VC++ 6.0 even supported fstream.h. You will most likely have to make several code changes during the port from 6.0 to 2010 compilers because 6.0 was not very compliant with c++ standards and allowed a lot of non-standard coding. So just fix the problems one at a …

Member Avatar for jwenting
0
182
Member Avatar for walaa_23
Member Avatar for kneel
Member Avatar for pichi89

>>float array[DefaultSIZE]; That array can not be resized. If you want to resize it then you have to declare it as a pointer and allocate the size. [icode]float* array;[/icode]

Member Avatar for pichi89
0
131
Member Avatar for Lukezzz

More than likely that program (Form1.exe) is still running in the background. Do Ctrl+Alt+Del to get tack manager then look at the list of running applications. If Form1.exe is listed there then try to kill it. If not, then you may have to reboot your computer to get it out …

Member Avatar for green_frog
0
5K
Member Avatar for lllllIllIlllI

Congrats on your first 1000 posts :) I was pretty thrilled about it too so I know how you feel.

Member Avatar for bumsfeld
10
248
Member Avatar for freakvista

If you know nothing at all about Pascal then start learning with something simpler. Do you have a textbook for your course? If yes, then do all the exercises at the end of each chapter. They were put there for learning experience, not to just make the textbook thicker and …

Member Avatar for jwenting
-1
619
Member Avatar for skorm909
Member Avatar for prade

You will have to make it a DLL then in VB use the same syntax that you would use with any other DLL. For details read[URL="http://http://www.google.com/custom?hl=en&client=pub-9300639326172081&cof=FORID%3A13%3BAH%3Aleft%3BCX%3AUbuntu%25209%252E10%3BL%3Ahttp%3A%2F%2Fwww.google.com%2Fintl%2Fen%2Fimages%2Flogos%2Fcustom_search_logo_sm.gif%3BLH%3A30%3BLP%3A1%3BLC%3A%230000ff%3BVLC%3A%23663399%3BDIV%3A%23336699%3B&adkw=AELymgUbteiqDMyTuDFikg4zslbtYMEGWV0dPRGqBiaoz1VTXX2_NfEN1yKwCCk2i7P1Sdt2Ir5RyXjw1kKUADNJP-m9XRRz_Y0g5k0947UBNaQdGkZ_ZIA&channel=2670846837&ie=ISO-8859-1&oe=ISO-8859-1&q=how+to+call+c%2B%2B+from+vb&btnG=Search&cx=partner-pub-9300639326172081%3Aqi7dvj9mh31"] these links[/URL]

Member Avatar for kvprajapati
0
282
Member Avatar for ans025

Your Read() function does not need an ofstream object because that is intended to write something. Read() function should only use ifstream to read the data. After opening the file you have to add a few lines to read each of the numbers in the file. Opening the file doesn't …

Member Avatar for ans025
0
203
Member Avatar for Mustashimo

I would make a second array then copy the elements you want to keep into it. When done delete all the elements of the original array, then copy the contents of the temp array into the original array. Doing that I believe you will only need two simple loops, one …

Member Avatar for Mustashimo
0
164
Member Avatar for ayushky

AFAIK it is not possible to password protect files on either MS-Windows or *nix. So the best solution is gerard's suggestion. Copy the files onto an external drive and delete the originals.

Member Avatar for Ancient Dragon
0
283
Member Avatar for bittu1028

If you want to display something on the same line of the screen as a previous instance, such as time, then just use '\r' to move the cursor back to the beginning of the first line. It does something similary to when you press the Backspace key on the keyboard. …

Member Avatar for Ancient Dragon
-1
92
Member Avatar for sana zafar

When find() failes it returns std::string::npos, which is an unsigned integer. So testing with an integer is useless. [code] size_t pos; while( (pos = data.find(data1)) != string::npos) { data.replace(pos,data1.length(),data2); } [/code] The danger with the above is when data1 contains data2. In that case the above would become an infinite …

Member Avatar for Ancient Dragon
0
173
Member Avatar for sukhraj.buttar

The expected responses are stupid. A question is either correct or wrong. The other two are subjective -- computer programs don't know how to think by themselves, at least not yet. They can't distinguish between correct and nearly correct.

Member Avatar for sukhraj.buttar
0
140
Member Avatar for Duki

Do you want static linking or dynamic linking? Such as do you want to link with the *.lib that came with the *.dll (if there was one), or use LoadLibrary() to load the DLL into memory?

Member Avatar for jonsca
0
102
Member Avatar for swbuko

first create a structure that contains the four numbers that can be found on each line [code] struct nums { int stations; int lbs1; int lbs2; int lbs3; }; [/code] now when you read a line, put the data in a structure, then add the structure to an array of …

Member Avatar for msnata2001
0
224
Member Avatar for lllllIllIlllI

I'm glad you enjoyed your trip :) Next time you visit you might want to go somewhere else, your experience may be much different. For example take a train from San Francisco California to New York, which is a trip of 3,000 miles across very diverse territory. Don't expect to …

Member Avatar for lllllIllIlllI
0
718
Member Avatar for vmirz

I don't understand what the problem is. Your program runs ok for me. If you are concerned about it displaying the return value in scientific notation, add [icode]<< fixed[/icode] before the call to recursion function.

Member Avatar for nezachem
0
97
Member Avatar for manutd4life

>> printf("endl"); Huh?? endl is c++, not c, and its not in quotes. I think what you want is [icode]printf("\n");[/icode]

Member Avatar for manutd4life
0
172
Member Avatar for SHENGTON

Your problem is that you didn't put anything at the end of main() to keep it from closing. Add getchar() just before the return statement.

Member Avatar for vsiddharthv
0
924
Member Avatar for hafeez_sheik

Or you could pay lots of $$$ for [URL="http://www.pkware.com/index.php?option=com_content&task=view&id=51&Itemid=80"]Pkware[/URL] library, who is the original author of the zip file format.

Member Avatar for pradip_
0
1K
Member Avatar for Mazen_1st

The mod operator works on integers, not letters. Put the letter in single quotes and it will work because that will change the letter to an integer [icode]rand() % 'z'[/icode] But that probably will not be what you are looking for. [URL="http://www.cprogramming.com/tutorial/random.html"]read this tutorial[/URL]

Member Avatar for Ancient Dragon
0
95
Member Avatar for ana12

[QUOTE=jwenting;1175596]you're wrong. There are a lot of people who are actually allergic to apples. Some like me to a very mild degree, we just get diarrhea eating raw apples. Others need medical attention.[/QUOTE] I love apples, but eating more than one or two a day can produce diarrhea for a …

Member Avatar for Lardmeister
-5
256
Member Avatar for ms_farenheit1

>>head->data=&s; That's the problem. Don't do that in a linked list. Instead, let the linked list own the memory for all strings by removing the pointer [code] struct sNode { string data; sNode * next; }; [/code]

Member Avatar for ms_farenheit1
0
139
Member Avatar for mystb

lines 10 and 14: Attempting to call strlen() with an array of integers instead of a character array. See the parameter to that function. You might want to add another parameter to that function that is the number of entries in the array. [icode]void encrypt(int b[50], int size)[/icode]

Member Avatar for mystb
0
299
Member Avatar for tehmarto

from what I seen in [URL="http://filext.com/file-extension/DBC"]this link[/URL] that is a file produced by Visual FoxPro. So the easiest way to do what you want is to buy a copy of VFP and let it export the data to a text file. Also [URL="http://www.experts-exchange.com/Microsoft/Applications/FoxPro/Q_20891853.html"]read this link[/URL]

Member Avatar for tehmarto
0
797
Member Avatar for Graphix

Yes I agree code snippets is a joke. Why? Because most of those posted in the past few months are not code snippets at all but just questions in which the op erroneously selected code snippet. Then the mods have to go in and correct those posts.

Member Avatar for diafol
0
174
Member Avatar for vinians

You have to pass to script_start a pointer to a pointer (two stars, not one) so that it can change it [code] int script_start(lua_State **L) { *L = lua_open(); if (*L == NULL) { script_error(L, "%s", lua_tostring(L, -1)); return -1; } luaopen_base(*L); luaopen_table(*L); luaopen_io(*L); luaopen_string(*L); luaopen_math(*L); luaopen_debug(*L); return 0; } …

Member Avatar for vinians
0
101
Member Avatar for coder19
Member Avatar for Ancient Dragon
0
44
Member Avatar for diafol

[QUOTE=Fazza;1178253]jephthah, as new member of the forum I'm just trying to fit in and try and not upset all the people who have been here for a long time so apologies for replying to an 11 day old thread - at least I now know that even if I can …

Member Avatar for diafol
1
717
Member Avatar for xcarbonx

put [icode]inFile.ignore()[/icode] after line 8 to remove the '\n' from the input buffer.

Member Avatar for kenji
0
93
Member Avatar for pichi89

It looks ok to me. Just make sure the calling function deletes the array when done with it to avoid memory leaks.

Member Avatar for Fbody
0
94
Member Avatar for riahc3

>>Now if I input 32432, 23432, 23234, 1233,9898, 87343, 238432 [b]gets()[/b] is a horrible function because if the input buffer is not large enough to hold all the characters you type then it will just scribble any excess characters all over memory. So if you typed that all on one …

Member Avatar for jephthah
0
203
Member Avatar for veeresh.k
Member Avatar for dragontruong

You posted the wrong part of the program. The problem is with the two classes you have defined. Just declare the class destructor as [b]virtual[/b] and the error will be fixed.

Member Avatar for mitrmkar
0
159
Member Avatar for amrna1

[QUOTE=amrna1;1195927]Please I want a help for I have special Software uses for laser machine And this software using a dongle and beside a dongle there are another software help the dongle call microdoginstdrv.exe and my questions now can I make my software work without the dongle because I lost the …

Member Avatar for Ancient Dragon
-2
149
Member Avatar for YeMiller

You just need to add the commas [icode]outFile << s1 << ',' << ss << ',' << p << endl[/icode] One problem you might encounter is if the text filed contains a comma. In that case you have to enclose it in double quotes. For example: [icode]1997,Ford,E350,\"Super, luxurious truck\"[/icode] The …

Member Avatar for YeMiller
0
603
Member Avatar for ahmed hefnawy
Member Avatar for Ancient Dragon
-1
75
Member Avatar for kingnebula

There are a couple workarounds for that problem. [URL="http://social.msdn.microsoft.com/Forums/en/windowssdk/thread/4a90b143-1fb8-43e9-a54c-956127e0c579"]Read this link[/URL].

Member Avatar for Ancient Dragon
0
276
Member Avatar for VernonDozier

You can view the comments of the rep you have been given by looking in your CONTROL PANEL (see the link at the top of every DaniWeb page) You could also do it your way, but press your browser's Back button or just clicking anywhere outside the rep box when …

Member Avatar for VernonDozier
0
101

The End.