15,300 Posted Topics

Member Avatar for ben1996123

you have to add some openGL libraries. Look in openGL docs for one of those functions and it should tell you what libraries you have to use.

Member Avatar for ben1996123
0
954
Member Avatar for haroonrulz
Member Avatar for Ancient Dragon
0
308
Member Avatar for samohtvii

its customary to name the top of the tree (node 1) "head" struct tree* head = NULL; After allocating a new tree node check of head == NULL, if it does then just set head = newnode.

Member Avatar for WaltP
0
173
Member Avatar for DeHF

You need to include <string> header file. Also, change <stdlib.h> to <cstdlib>

Member Avatar for WaltP
0
316
Member Avatar for delta_frost

Compilers are not required to honor the inline keyword, so the first example is guarenteed to be the fastest. The other two examples may or may not be the same timing, depending on the compiler.

Member Avatar for deceptikon
0
189
Member Avatar for breezeonhold

Just because the build succeedes doesn't mean the program works correctly. Use your compiler's debugger to find out where the problem is. The problem is line 84 -- I found it in less than 1 minute with the debugger. [edit]I see you edited your post to correct that problem after …

Member Avatar for breezeonhold
0
278
Member Avatar for Blank808

You could get [this one](http://www.forecastpro.com/products/overview/FPSDK.htm). Or you could write the program yourself if you know how to forcast inventories. google might be the first place to start learning how its done.

Member Avatar for Ancient Dragon
-1
56
Member Avatar for samohtvii

>And it wouldn't be the first time that a noob incorrectly posted a C++ question in the C forum would it? I've done it by mistake several times.

Member Avatar for Ancient Dragon
0
803
Member Avatar for RonKevin

>no wait...its not wrong...we are just using different Compilers. Yes it is wrong, the C and C++ standards dictate that main() always returns an int, that's the standard way all compilers do it. If your compiler deviates from that then you are likely to encounter problems if you use another …

Member Avatar for RonKevin
0
341
Member Avatar for abi_gurl

What you posted will work only inside that function. As soon as the function exits the grid will be destroyed. You can resolve that by passing a pointer to the grid to the function, something like this: void displayBoard(char board[][10]) { // code goes here } int main() { char …

Member Avatar for abi_gurl
0
169
Member Avatar for menonlinux

>I am having TurboC installed in my system Why? Sounds like that old ancient compiler is not compatible with modern computers and modern graphics cards. If you want to use that compiler then try to find yourself a 30-year-old computer, one that was made in the 1980s or 1990s.

Member Avatar for Ancient Dragon
0
152
Member Avatar for Ancient Dragon

I can't edit the code I posted in [this thread](http://www.daniweb.com/software-development/cpp/threads/432459/c-variable-in-sqlite-query#post1854736) because it won't let me place the cursor where I need to add something. I put the somewhere then use the arrow keys to move it to the right spot but it just goes to random locations. I want to …

Member Avatar for Ancient Dragon
0
229
Member Avatar for Ancient Dragon

I don't like it. When I start a new thread I get a popup asking if I want to share it on Facebook etc. Looks cute the first time, but it will get very annoying after that.

Member Avatar for phorce
0
85
Member Avatar for romanromeo89

You have to set the string before calling salite3_prepare(). std::string select; std::string username = "AncientDragon"; select = "SELECT * FROM grammateas WHERE username = '" + username.c_str() + "'"; sqlite3_prepare_v2(handler,select.c_str(), -1, &statement, 0);

Member Avatar for romanromeo89
0
759
Member Avatar for Jsplinter

The results make sense -- vectors have a lot of overhead that take cpu cycles, more time than just doing the calculations. The program has to make other calculations just to access the vector item.

Member Avatar for Jsplinter
0
269
Member Avatar for Despairy

Since all the cells have different values the only way to do it is in a loop, incrementing the cell values one at a time. Are they all incrementing values like you posted? I suspect they are not because if they were then you would not need the array.

Member Avatar for Despairy
0
299
Member Avatar for streetalex310

You can easily do it yourself. Just look up those hex numbers in any [ascii chart](http://www.ascii-code.com/)

Member Avatar for WaltP
0
162
Member Avatar for BradenMurphy
Member Avatar for Ancient Dragon
0
205
Member Avatar for nchy13

The reason cores is modified each time a line is read is because cores is a pointer to the file input buffer str1. Change core to just a single char instead of a pointer so that it will not depend on the contents of str1. The condition on line 25 …

Member Avatar for nchy13
0
354
Member Avatar for Hyperion101

(5/9) is doing integer division, not floating point division, which means that all fractions are lost, so the result of that is 0. To correct that problem add a decimal point, e.g. (5.0/9.0) or (5.0/9) or (5/9.0). As long as numerator or denominator or both are floating point numbers it …

Member Avatar for Hyperion101
0
662
Member Avatar for WolfShield

15 years ago I chain smoked, the room I worked in was always filled with my smoke. Then one day the boss banned smoking from the workplace, so I would take frequent breaks to smoke outside, regardless of weather. I smoked in my house also, until one day we had …

Member Avatar for BitBlt
0
250
Member Avatar for haroonrulz

You need to call [SysAllocStringByLen](http://msdn.microsoft.com/en-us/library/windows/desktop/ms221637(v=vs.85).aspx) because the strings are char\* instead of wchar_t\*

Member Avatar for Ancient Dragon
0
312
Member Avatar for Reverend Jim

The same reason I asked the same question awhile back, you have to hit the Refresh button on your browser. Its a javascript quirk.

Member Avatar for Ancient Dragon
0
64
Member Avatar for PrimeOutsourcin

Go shopping, play Diablo III game, or visit DaniWeb. Occasionally I'll drive to one of the near-by tourist attractions for the day.

Member Avatar for Ene Uran
0
232
Member Avatar for angelineang

build failed because you didn't write code for function disp_student_classhonour() (or you didn't post it)

Member Avatar for Lucaci Andrew
0
206
Member Avatar for simps0n

you need to keep two different pointers for curr because you have two different loops. Try this: [code] curr1 = head; while(curr1) { strcpy(check,curr1->word); curr2 = curr1->next; while(curr2) { if(strcmp(check,curr2->word)==0) printf("duplicate"); {here should come the remove node function} curr2 = curr2->next; } cur1 = cur1->next; } [/code]

Member Avatar for rubberman
0
344
Member Avatar for theju112

>But could anyone please help me with how to convert these char arrays into integer arrays. No conversion is necessary, characers are nothing more than small one-byte integers with a range of values -127 to 126 or unsigned 0 to 255. You simply treat then as if they were int …

Member Avatar for Lucaci Andrew
0
153
Member Avatar for emmykofi
Member Avatar for modesto916
Member Avatar for modesto916
0
264
Member Avatar for every1play

A quick glance at the code indicates whoever wrote it didn't know what he/she was doing. For example lines 28-35 are writing beyond the boundries of the array. Line 25 declares undefined return value for main() -- the only legal value is int, never void. I'm not going to bother …

Member Avatar for nishavas01
0
212
Member Avatar for manishanibhwani

The ++ operator doesn't know the difference, the compiler determines the difference based on where the ++ operator is used, such as ++i or i++. And in some cases it won't matter whether its post or prefix. The code inside the operator function should not care one way or the …

Member Avatar for admin1982
0
164
Member Avatar for I_m_rude

I don't know if this is the "most efficient" way, but one way to do it is to have an array of integers, then fill the array with numbers as they are read from the file. When you find a number that appears a second time delete it from the …

Member Avatar for Ancient Dragon
0
103
Member Avatar for t888eddy

It might be easier to use fscanf() rather than fgets() float dollars = 0.0F; int nAnimals, nRacks; fscanf(in,"%f", &dollars); fscanf(in,"%d%d", &nAnimals,nRacks); // etc etc As for the rest of the problem, I'd first sit down with and figure it all out by hand with pencil & paper so that you …

Member Avatar for t888eddy
0
226
Member Avatar for rithish

line 10 is impossible because merge_sort() does not take that many parameters. The number of parameters on line 10 have to match exactly the parameters on line 1. You can give them different variable names, but the number and type of parameters must be the same. The value of mid …

Member Avatar for WaltP
0
108
Member Avatar for swaggerCurioS

what compiler are you using? Try debugging it (single-step through the program until you find the line that produces the error). Many good IDEs will have debuggers that let you do that. Check for uninitialized pointers.

Member Avatar for Ancient Dragon
0
364
Member Avatar for PinoyDev

I call mktime(). One crevet -- you need to initialize all fields of struct tm to 0 before using it becuse mktime() will return an error of any of the fields contain random junk values. Here's an easy/quick way to do that. struct tm tm; memset(&tm,0,sizeof(struct tm));

Member Avatar for deceptikon
0
4K
Member Avatar for tiredoy

[use assert(](http://www.cplusplus.com/reference/clibrary/cassert/assert/)) instead of TRACE. Or create a console project that supports MFC.

Member Avatar for vijayan121
0
212
Member Avatar for phorce

It might also depend on which operating system the wav file was originally written with -- such as [Big or Little Endian](http://en.wikipedia.org/wiki/Endianness)

Member Avatar for Ancient Dragon
0
236
Member Avatar for zeeshan.mustafa.3557

Check out some of [these Microsoft links](https://www.google.com/#hl=en&sclient=psy-ab&q=visual+c%2B%2B+2010+walkthrough&oq=vc%2B%2B+2010+walk&gs_l=hp.1.0.0i22.74.6794.1.9089.10.8.1.1.1.0.78.507.8.8.0.les%3B..0.0...1c.AzIWY1QwKxo&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=1150f400ff4f823e&biw=1590&bih=870). As they say, practice makes perfect, so you should plan to spend a lot of time creating projects, exploring the various options available in the IDE, and learning to use the excellent debugging facilities. And don't forget that you can always ask questions …

Member Avatar for Ancient Dragon
0
226
Member Avatar for Azurea

1) system("pause") is not portable -- only works on MS-Windows and MS-DOS operating systems. 2) cin.get() is a lot faster [URL="http://www.gidnetwork.com/b-61.html"]Other reasons[/URL]

Member Avatar for WaltP
0
617
Member Avatar for aasi007onfire

>>i saw this code in a particular book..... what an awful algorithm to put in a book! I thought books were supposed to teach the language not how to obfuscate it. I think you should trash-can that book and get a different one.

Member Avatar for Ancient Dragon
0
193
Member Avatar for 'AnKo
Member Avatar for Ancient Dragon
0
139
Member Avatar for DavidB

It will probably find little green people with long antennas saying ["nano nano"](http://www.google.com/imgres?imgurl=http://the60sofficialsite.com/images/antenna%2520-%2520My%2520Favorite%2520Martian.jpg&imgrefurl=http://the60sofficialsite.com/My_Favorite_Martian.html&h=320&w=306&sz=16&tbnid=p753SYLOKXV6TM:&tbnh=90&tbnw=86&zoom=1&usg=__DrQL8wsTE1QyU_mmzClLi9XlJ_Y=&docid=iRaNQgbol66UEM&hl=en&sa=X&ei=bWMuUKyDDcbaywHszoCwBg&sqi=2&ved=0CGYQ9QEwBA&dur=606)

Member Avatar for vinnitro
0
257
Member Avatar for GrimJack

[QUOTE=Salem;1098444]...when you can remember having to use an ACTUAL [URL="http://en.wikipedia.org/wiki/Rotary_dial"]dial [/URL]to dial a telephone number.[/QUOTE] Or a crank telephone Or remember watching [URL="http://www.youtube.com/watch?v=va5Btg4kkUE"]this presidential campaign ad on tv[/URL]

Member Avatar for vinnitro
1
3K
Member Avatar for emmanuell

you could compress them with a program like WinZip then require a password before de-compressing them.

Member Avatar for np complete
0
147
Member Avatar for gAb1

> i need to download a good compiler, what can you recommend me? Download free VC++ 2010 Express or newer -- vc++ 2012 will be released when Windows 8 is released, but you can get prerelease version now for free. You might also try Code::Blocks with MinGW. Dev-C++ doesn't work …

Member Avatar for _avishek
0
200
Member Avatar for rishad1418

Do you mean the edit control? If you need to edit a label control then just change its Text property.

Member Avatar for np complete
0
58
Member Avatar for Ancient Dragon

I just noticed the text in the Related Article link now includes a lot of information that could be useful to prevent prople from resurrecting old threads. Is that something new you have added receitly? Whether its new or not I like it. :)

Member Avatar for gerbil
0
231
Member Avatar for np complete

Where have you searched? Have you studied the information in [this link](http://issc.uj.ac.za/symbolic/symbolic.html)?

Member Avatar for np complete
0
333
Member Avatar for billionair

go to a command prompt and try that command. BTW your program works ok on Windows 7 using vc++ 2012. What compiler and operating system are you using?

Member Avatar for Ancient Dragon
0
847

The End.