15,300 Posted Topics

Member Avatar for brianmat

>>All of the sudden my computer stopped playing music files That happened to me too awhile back. Foolish me! I had turned off the power to the speakers

Member Avatar for Bublestuff
0
809
Member Avatar for rowley4

If you are using c++ why use character pointers? Just include <string> and use the std::string class becuse its much easier to use. All you need to do is define a class or structure with two objects: std::string word and int count.. Then you could create a <vector> of that …

Member Avatar for babloo 123
0
473
Member Avatar for goldminer69er

Welcome to DaniWeb. Sure wish you would create your own web site and post pictures of what you do there in the desert. I lived in Tucson for a few years during 1970s and whish I could go back.

Member Avatar for goldminer69er
0
73
Member Avatar for unnamed17

It is a lot more difficult in C language [URL="http://www.easysoft.com/developer/languages/c/odbc_tutorial.html"]see ODBC tutorials[/URL]

Member Avatar for N1GHTS
0
146
Member Avatar for daviddoria

or like this, where there is only one return statement [code] bool function(int a) { bool rvalue = false; if(a == 2) { // do something rvalue = true; } else { // do something else rvalue = false; } return rvalue; } [/code]

Member Avatar for mrnutty
0
220
Member Avatar for Slimmy

You mean you want to sort the array without actually swapping array values? I have done that before but used a second array of intgers that represent the array indices. [code] float data[5] = {3,1,4,9,2}; int indices[5] = {0,1,2,3,4}; // sort the data for(int i = 0; i < 4; …

Member Avatar for Slimmy
0
126
Member Avatar for mayyubiradar

I suppose the easiest way would be to use [URL="http://www.ibusy.com/articles/software-development/boost-html-library.html"]boost HTML parser[/URL]

Member Avatar for mayyubiradar
0
623
Member Avatar for iw2z

When main.cpp is compiled the compiler generated main.obj (or main.o depending on the os). When custom.cpp is compiled the compiler generated custom.obj. The linker uses both main.obj and custom.obj, as well as other libraries, to create the executable program. How does the linker know how to do that? It depends …

Member Avatar for Ancient Dragon
0
180
Member Avatar for crazylunatic

what does struct date look like? >>fout.write((char *)(&m),sizeof(m)); you really should not write c++ classes to the file like that. classes which contains other c++ classes such as std::string, std::vector, c-pointers, etc, can not be written like that. It is safer and more portable from one run of the application …

Member Avatar for deeps84
1
343
Member Avatar for Orion2k

Which version of Visual Studio 2010 are you using? >>well first of all I ask u people don't try to give me advices like use QT instead that waste my time lot With a statement like that you are likely to not get any advice at all.

Member Avatar for Ancient Dragon
-1
153
Member Avatar for anantk

arrays are always, always indexed beginning from 0, never 1. So line 38 should be [icode] for (int i=0;i<401;i++)[/icode]. The index values on lines 41 and 42 should be using the loop counter i, not the value of j that was read from the file. What would your program do …

Member Avatar for anantk
0
131
Member Avatar for dorien

Think of a class as an entity all on its own -- the class has no knowledge of anything outside its class. It's not possible for a class to access objects declared elsewhere in the program.

Member Avatar for kes166
0
184
Member Avatar for smithr3

two things 1) what is the value of n before that loop starts? Uninitialized variable is the most likely reason the data is not being written to the file. Add [icode]n = 0;[/icode] on line 6 and see if that doesn't fix the problem. 2: The code is not writing …

Member Avatar for Ancient Dragon
0
128
Member Avatar for WASDted
Member Avatar for remarkablyso
0
148
Member Avatar for Vagelis44

>>error: glibtop.h: No such file or directory Either you don't have glib installed on your computer or you need to tell your compiler where to find it. >>Or to give me another idea like how to get info from /proc/cpuinfo Don't know, but someone else probably does.

Member Avatar for harshil_shah007
0
548
Member Avatar for ekailan

The first works ok because L converts a string literal from char* to wcar_t*. The second doesn't work because it is attempting to pass char* to a function that expects wchar_t*, and typecasting will ont convert that either. [URL="http://msdn.microsoft.com/en-us/library/ms235631(VS.80).aspx"]Read this article[/URL]

Member Avatar for ekailan
0
204
Member Avatar for swapnaoe

The [b]extern[/b] keyword only tells the compiler that the variable will be declared later. It's common to declare variables using extern in header files. Then in one, and only one *.c file the variable(s) have to be declared again but without the extern keyword. The compiler does not complain about …

Member Avatar for Ancient Dragon
0
194
Member Avatar for nbuchholz

Welcome to DaniWeb. Ohhh how I loved Tucson when I was there for three years during the 1970s. I hope the city is just as great now as it was then.

Member Avatar for Ancient Dragon
0
194
Member Avatar for swapnaoe

That may be some compiler-specific extensions to the c++ standards. None of the compilers I know about allow that kind of constructs.

Member Avatar for swapnaoe
0
173
Member Avatar for myk45

Sounds like what you want are tutorials. There are lots of sites that have them, such as DaniWeb, and [URL="http://www.dreamincode.net/"]Dream.In.Code[/URL] As for practicing -- just do it on your own computer with your own compiler. Unless of course you don't have a computer of your own.

Member Avatar for Fbody
0
268
Member Avatar for JesterDev

You can also make SIZE char like this: [icode]char c = SIZE;[/icode] Or a double like this: [icode]double d = SIZE;[/icode] Or you can use defines to construct strings, as in this simple example. [code] #define SIZE 65 main() { char p[] = {SIZE,'p','p','l','e','\0'}; printf("%s\n", p); } [/code]

Member Avatar for Ancient Dragon
0
4K
Member Avatar for crodriguez08

Delete that do loop on line 152. Why would you want to continuously read the same file over, and over, and over forever??? change the loop starting on line 64 to this: [code] while( MySimpletron >> instructionRegister ) { memory[size] = instructionRegister; cout << setfill('0') << setw(4) << memory[size] << …

Member Avatar for crodriguez08
0
193
Member Avatar for SpiritualMadMan

That was a common problem with that compiler and the only fix is to reboot the computer. Unfortunately there is another common problem -- when you try to save a file the IDE thinks the file is already open by anothe program and can't save it. That can resut in …

Member Avatar for SpiritualMadMan
0
425
Member Avatar for shaliniP

write a program that parses a *.cpp file and extracts all its symbols. Your program will have to recognize valid symbol names, which may be easier if the *.cpp file is formatted so that symbol names are surrounded by spaces [icode]int example = 0;[/icode] instead of this: [icode]int example=0;[/icode]

Member Avatar for Ancient Dragon
1
61
Member Avatar for N1GHTS

you are seeing the difference between %s and %S (not the capitalization os s and S). with swprintf(): %s assumes the parameter is a wchar_t* %S assumes the prameter is char* The rule is just the opposite with sprintf() This illustrates the difference [code] int main() { wchar_t buf[255] = …

Member Avatar for sree_ec
0
187
Member Avatar for Nemo_NIIT
Member Avatar for Ancient Dragon
0
175
Member Avatar for suncica2222

I don't think you can use that code to update a file on some other computer. You might have to use [URL="http://www.aspfree.com/c/a/.NET/Introduction-to-RPC-on-Windows-Part-I/"]Windows RPC[/URL] to accomplish that.

Member Avatar for usagi
0
247
Member Avatar for headedtomexico

download and use [URL="http://www.dependencywalker.com/"]this dependency walker [/URL]to find out what dlls and libraries your program needs

Member Avatar for Ancient Dragon
0
160
Member Avatar for sbhavan

Neither Fedora nor Ubuntu work correctly on 64-bit computers; I mean the os itself is ok but they have problems with sound and playing movies. Vista works great right out of the box with no tweaking needed. So my vote is for Windows. Never used a MAC so don't know …

Member Avatar for 11thlogin
-3
436
Member Avatar for ryathegr8

Depends on the operating system. MS-Windows use [URL="http://msdn.microsoft.com/en-us/library/ms632589(VS.85).aspx"]Windows Hooks.[/URL]

Member Avatar for frogboy77
0
96
Member Avatar for Supriyo

>>Can a standalone programmer design large scale C++ projects? No because one person doesn't have the time to do it. It takes a team of people to design them so that the project gets the benefits of all their ideas and knowledge. I know Windows Word and the Windows operating …

Member Avatar for xtrmR
0
356
Member Avatar for unnamed17

1. Read a line from the text file 2. Break the line apart using strtok() or some other method to put each field into its own variable. 3. Write the SQL INSERT or UPDATE statement 4. Execute the statement in #3 above 5. Make whatever checks you want on the …

Member Avatar for unnamed17
0
121
Member Avatar for jeffpro

Sleep() only works for the current thread, it does not affect other threads. So if you think other threads are also sleeping then you are doing something wrong or you do not understand the code you wrote. If you put that same Sleep() at the same place in the code …

Member Avatar for chiwawa10
0
119
Member Avatar for prasanthsagar

Don't post something just becaue you might think it might be useful to someone some day. I was going to answer the question, but now I'm glad I didn't wast my time on it.

Member Avatar for N1GHTS
0
313
Member Avatar for homeryansta

Did you set up event handling functions for the controls that are on the form being passed in? If not then you need to do that because that is what makes the controls do things.

Member Avatar for Milton Neal
0
202
Member Avatar for madankumar

Please ask specific questions -- doesn't it compile? If not, why? Doesn't it work right? No, then what is wrong with it.

Member Avatar for MyNameIsLJ
0
197
Member Avatar for asyk

1. move line 20 so that it increments i after line 22. 2. line 31: There is no need for that j loop. Just make the tests for minimum and maximum within the i loop that starts on line 19. Every time a new number of entered check of the …

Member Avatar for asyk
0
141
Member Avatar for Bardoel

are you asking for a program that will send out spam text messages ? If so I doubt you will find it on DaniWeb.

Member Avatar for nisu
1
539
Member Avatar for karishma10
Member Avatar for jogieglenmait

>>I have tried to tokenize the whole file Post what you have tried. >>getline cant have delimiters in it. [code] std::string word; ifstream in("filename.txt"); while( getline(in,word,',') ) { do something with this token } [/code]

Member Avatar for jogieglenmait
0
375
Member Avatar for Aditya Hegde

Read through the threads on this forum and you will find hundreds of programs you can code.

Member Avatar for justiceigwe
0
64
Member Avatar for Dark Byte

did you see [URL="http://www.youtube.com/watch?v=WsxSIDxLE4M"]this video tutorial[/URL]?

Member Avatar for Ancient Dragon
0
177
Member Avatar for jorgempaz

>>do I have to redraw everything? Yes, well maybe. >>if so, which controls should I include (at WndProc?) catch the [URL="http://msdn.microsoft.com/en-us/library/dd145213(VS.85).aspx"]WM_PAINT event[/URL].

Member Avatar for jorgempaz
0
161
Member Avatar for kermit1422

>> How do I edit my profile? Click the CONTROL PANEL link at the very top right corner of the page. It's just above the SEARCH edit box.

Member Avatar for kermit1422
0
212
Member Avatar for frogboy77

Read [URL="http://www.cplusplus.com/reference/clibrary/cmath/pow/"]this link[/URL] and you will see that none of the overloaded functions take two integers.

Member Avatar for Fbody
0
142
Member Avatar for fire_

did you declare variable CStr? [icode]CString Cstr;[/icode] Instead of that loop, just try this: [icode]CSt = str.c_str();[/icode] assuming CStr is of type CString.

Member Avatar for fire_
0
636
Member Avatar for Bri426

You need to read a tutorial or book about how to write for loops. The for loop has three parts 1. The sttement that initializes the loop counter and/or other variables 2. The test for a condition which will terminate the loop. 3. Increment or decrement the loop counter Any …

Member Avatar for frogboy77
0
236
Member Avatar for GrimJack
Member Avatar for waphon
Member Avatar for D4n1sD

GetWindowText() returns an int, which can not be typecast to char* or LPCTSTR. Read all about that function [URL="http://msdn.microsoft.com/en-us/library/ms633520(VS.85).aspx"]here[/URL] instead of just blindly tossing code at your compiler and expecting things to work.

Member Avatar for Ancient Dragon
0
73

The End.