15,300 Posted Topics

Member Avatar for safia qurban

[QUOTE=Narue;1151242][B]>i want to give a presention on functions use in code[/B] [B]>can any one help me ,as give me these codes?[/B] Wait. You're giving a presentation on something that you don't even know how to do?[/QUOTE] Is that so uncommon? The idea is for him to learn how to do …

Member Avatar for Ancient Dragon
0
274
Member Avatar for Stefano Mtangoo

blobs are nothing more or less than large chunks of binary data. The database knows nothing about the blob's contents, its up to your program to interpret that. [URL="http://www.developer.com/net/asp/article.php/3761486/Working-with-Binary-Large-Objects-BLOBs-Using-SQL-Server-and-ADONET.htm"]Here [/URL]is one article that may help you.

Member Avatar for Stefano Mtangoo
0
122
Member Avatar for pato wlmc

[URL="http://lmgtfy.com/?q=how+to+install+windows+fonts"]Google will help you out.[/URL]

Member Avatar for pato wlmc
0
207
Member Avatar for Kikazaru

[QUOTE=Kikazaru;1149127]Thanks for the quick responses. What I'm really wondering is whether giving the const qualifier really does facilitate any compiler optimizations (in the case of a variable which is local to a function and only assigned upon initialization). [/quote] Read Necrolin's post. [QUOTE=Kikazaru;1149127]-I'm wondering if hunting down and clarifying all …

Member Avatar for vijayan121
0
3K
Member Avatar for tkud

[URL="http://lmgtfy.com/?q=socket+programming+tutorial"]google will show you lots of information and tutorials[/URL]

Member Avatar for Stefano Mtangoo
0
150
Member Avatar for Teach25

It sounds like a math problem not a programming problem (combination theory). How many combinations are there in N values taken two at a time? If there were just 2 points, X and Y, there would be just one line. Given 3 points, X, Y, and Z, there would be …

Member Avatar for mrnutty
0
136
Member Avatar for Salem
Member Avatar for Ancient Dragon
0
109
Member Avatar for Carrots

>>Base * ReturnPtrToANewBaseClassObject() In base.cpp you forgot to add the Base:: class scope [icode]Base * Base::ReturnPtrToANewBaseClassObject()[/icode]

Member Avatar for Ancient Dragon
0
240
Member Avatar for Gagless

>>Will this do the job? Don't know -- why don't you compile and test it to see if it will work correctly. add a print statement on every insertion to see if the array was shifted correctly.

Member Avatar for WaltP
0
159
Member Avatar for Wraithmanilian

Oh well, win some, lose some. Congratulations to Canada for that win. But we still have more medals than they do.

Member Avatar for vegaseat
0
143
Member Avatar for lecotti

An array of 22 2x2 arrays is declared [icode]char matrix[22][2][2];[/icode]

Member Avatar for lecotti
0
134
Member Avatar for sexyzebra19

0 seconds is probably correct. Computers will execute that code in just a few nanoseconds. Call clock() instead of time() because clock() has higher resolution. But that too may result in 0. If it does, then call that Multiply function several hundred times and take the average time. [code] clock_t …

Member Avatar for Salem
0
421
Member Avatar for jindalboss

It will depend on what operating system you are using. [URL="http://winprog.org/tutorial/"]This[/URL] is a pretty standard tutorial for MS-Windows.

Member Avatar for Ancient Dragon
0
28
Member Avatar for eliza420

read the file one word at a time and compare each word read with the string. you can use fstream's extract operator >> to do that [code] std::string word; std::fstream in("filename"); // read one word in >> word; // now compare [/code]

Member Avatar for Fbody
0
170
Member Avatar for casjackkwok2001
Member Avatar for Ancient Dragon
0
161
Member Avatar for donelliewhyte

So what do you need help with? We are not going to write that program for you, so you might as well get started.

Member Avatar for Ancient Dragon
0
144
Member Avatar for BeyondTheEye

I'm trying to recall from some work I did 15 years ago. Seem to remember that all you do is xmit a single byte that contains the bit pattern you need. But then again, maybe not. SetCommStat() might do it for you.

Member Avatar for BeyondTheEye
0
264
Member Avatar for Tango2010

See [URL="http://www.daniweb.com/code/snippet216612.html"]this code snippet [/URL]I posted here about 5 years ago.

Member Avatar for Salem
0
665
Member Avatar for logicalguy

The comparison function is comparing addresses, not the values that are in the structures [code] int indirectstructsortbyid(const void *i1, const void *i2) { struct mys **a = (struct mys **)i1; struct mys **b = (struct mys **)i2; return (*b)->id - (*a)->id; } [/code] [edit]^^ Adak beat me to it.[/edit]

Member Avatar for Dave Sinkula
0
5K
Member Avatar for daviddoria

My guess is that you are including MyClass.ini on two or more *.cpp files. objects can not be declared in header files because it causes the multiple declaration link errors that you have. Suggest you do not use MyClass.ini at all. Instead, put the initialization in one, and only one, …

Member Avatar for daviddoria
0
221
Member Avatar for johndoe444

When line 2 failes that function should return right away instead of processing the rest of that function.

Member Avatar for Adak
0
185
Member Avatar for dibbieshir

strstr() is used to find a string within another string. For example, it would check if "World" is contained in the string "Hello World". strstr() is not related to structures or typedef struct.

Member Avatar for Dave Sinkula
0
234
Member Avatar for iNach
Member Avatar for xavier666
0
8K
Member Avatar for daviddoria

main() is passing integers, but the va on line 27 is trying to get floats. Change main() to pass floats. [icode] Function1(3, 1.0F, 2.0F, 3.0F);[/icode]

Member Avatar for daviddoria
0
234
Member Avatar for pratima

In c++ [code] #include <iostream> #include <algorithm> #include <string> using namespace std; int main() { string str = "How now brown cow."; transform(str.begin(),str.end(),str.begin(),toupper); cout << str; return 0; } [/code]

Member Avatar for Nick Evan
0
2K
Member Avatar for axed

Memory for all types of static variables is allocated when the program is compiled, just the same as when memory is allocated to normal global variables. When your compiler creates the executable program that program includes memory for all the functions that you wrote (or linked with in libraries) as …

Member Avatar for axed
0
159
Member Avatar for rkulp

The first parameter is a two dimenaional array of characters, declared something like this: [icode]char grid[20][MAX_Y];[/icode]. The second parameter is a single Line object passed by reference. [code] char grid[5][MAX_Y]; Line line; drawLineInGrid(grid,line) [/code] I assume you need to initialize the grid with some values before calling that function.

Member Avatar for Ancient Dragon
0
176
Member Avatar for johndoe444

That's why you should write and debug such programs in small sections. I suppose you are using *nix, so learn to use a debugger such as dbg, which will pinpoint the seg fault for you by using the core file. The program first has to be compiled for debug -- …

Member Avatar for thomas_naveen
0
126
Member Avatar for carol.f

[URL="http://lmgtfy.com/?q=c%2B%2B+friend+functions"]google is your programming buddy.[/URL]

Member Avatar for Ancient Dragon
-1
36
Member Avatar for dczet

You may have physically placed the libraries in those directories, but did you tell your compiler that it needs to look for those libraries ? I don't use Borland compilers so I don't know how to do that. Maybe in project setting somewhere.

Member Avatar for hsagar22
0
378
Member Avatar for Stefano Mtangoo
Member Avatar for Stefano Mtangoo
0
402
Member Avatar for sexyzebra19

I wouldn't make duplicates of A and B, but put the results in matrix C so that A and B are left unchanged.

Member Avatar for sexyzebra19
0
97
Member Avatar for marcel222

how did you write the gui? win32 api, MFC, wxWindows or something else? And is the serial port code in the same or different thread than the gui?

Member Avatar for Ancient Dragon
0
160
Member Avatar for prakashjoshi010

The scope operator is c++, not C. In C give the variables different names so that you, and the compiler don't get confused.

Member Avatar for Ancient Dragon
0
94
Member Avatar for Christoph928

combine the loops on lines 31 and 37 because there should only be one loop, not two. [code] while( infile >> lname >> fname >> midInitial ) { file2 = fname + lname + ".dat"; ifstream in(file2.c_str()); if( in.is_open()) { while( in >> ton ) { // do stuff here …

Member Avatar for WaltP
0
198
Member Avatar for Mridula J

[URL="http://www.daniweb.com/forums/thread70096.html"]You must have missed this thread.[/URL]

Member Avatar for gnarlyskim
0
71
Member Avatar for shivnath
Member Avatar for JHus00

[icode]if( windspeed >= -40 && windspeed <= 40) [/icode] When working with negative numbers the operation is the reverse of positive numbers. That is, -50 is less than, not greater than, -40.

Member Avatar for Ancient Dragon
0
92
Member Avatar for delhiris

[URL="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&source=hp&q=database++c%2B%2B+.net&btnG=Google+Search"]Read some of these links[/URL]

Member Avatar for Ancient Dragon
0
51
Member Avatar for whoamineo89

lines 81 and 84. I see no object named "addressbook". There is of course a structure by that name, but no object. Create an object of that type, (don't use the same name as the structure to prevent confusion)

Member Avatar for Ancient Dragon
1
5K
Member Avatar for sandeshps

wrong compiler. Use either Code::Blocks or VC++ 2008 Express (both are free) so that the program can take advantage of up to 2 gig RAM and huge data files. The compiler you want to use can't either of those. You will also learn how to write a modern c++ program …

Member Avatar for Ancient Dragon
0
45
Member Avatar for rockstar8577

Of course. Since myfile is ofstream it is not necessary to specify ios::out because that's what ofstream does anyway. [code] name += ".sta"; myfile.open(name.c_str()); [/code]

Member Avatar for rockstar8577
1
73
Member Avatar for mmasny

If the reference (e.g. int*& thingy;) was actually allocated somewhere else then your class destructor should not do anything with it. Let whatever created it destroy it.

Member Avatar for mmasny
0
155
Member Avatar for Stefano Mtangoo

You sould completly replace cmd.exe with your own version of that program. For example Microsoft has already done it with [URL="http://pauledlund.spaces.live.com/blog/cns!70265AE7CABD0249!380.entry"]PowerShell[/URL]. Another example [URL="http://www.computerhope.com/forum/index.php?topic=77629.0"]here[/URL]

Member Avatar for Stefano Mtangoo
0
775
Member Avatar for Tech E

The >> operator stops at the first space, so if you enter "John Doe" as the name the cin will put John in name and Doe in Address. Change the >> operator to getline [icode]getline(cin, name);[/icode]

Member Avatar for Fbody
1
123
Member Avatar for ambarisha.kn

[QUOTE=Tango2010;1144973]hi, using this methodology, is there a piece of code I could write if after where a folder in directory is detected to scan all files in that folder and then return to the root folder to continue? Many thanks[/QUOTE] Use recursion. There are some examples of that in the …

Member Avatar for Ancient Dragon
-1
1K
Member Avatar for kilon666

reading files is the same in console and gui programs. The difference between C and C++ is that C++ will use fstream and C will use FILE*. There are many tutorials and code snippets that will show you how to read a file using FILE*. [URL="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&source=hp&q=how+to+read+a+file+in+c+language&btnG=Google+Search"]Here is a google list.[/URL]

Member Avatar for Ancient Dragon
0
142
Member Avatar for lookez

You can open any file with FILE*. It doesn't matter what the extension is. [icode]FILE* fp = fopen("name.html","r");[/icode]

Member Avatar for IsharaComix
0
161
Member Avatar for Swiftle

line 59: What will that function do if the parameter Dictionary object gets destroyed?? A: All those pointers will become invalid. It is better if the [b]this[/b] object creates its own copy of the Index array so that it will own all the memory instead of relying on the memory …

Member Avatar for mitrmkar
0
144
Member Avatar for vidit_X

1) include stdlib.h and use _MAX_PATH macro to declare the size of the source and destination buffers. On MS-Windows its value is 260. In c++ programs it will be better to use std::string variables instead of char arrays. If you do that then you don't need stdlib.h. line 21: The …

Member Avatar for mrnutty
0
380

The End.