15,300 Posted Topics

Member Avatar for a.baki

[URL="http://geometryalgorithms.com/Archive/algorithm_0108/algorithm_0108.htm"]This[/URL] seems to be a promising link. I only quickly scanned the article but looks like it has some code. [URL="http://www.google.com/search?hl=en&q=Bentley-Ottmann+Algorithm&btnG=Google+Search"]google [/URL]can be a programmer's best friend sometimes.

Member Avatar for quintoncoert
0
246
Member Avatar for shannonpaul

Not a good idea to use doubles in switch statements because they are often inprecice due to the way they are stored in memory. If you really have to use switch instead of that if statement then you should multiply it by 100 then assigned the result to an integer. …

Member Avatar for vijayan121
0
128
Member Avatar for AquilesBailo

Does it matter how long the delay is? You can use time() to delay for a specific number of seconds. You need one time_t object and set it to the current time. Then enter a loop until the value returned by time() minus the original time equals or exceeds the …

Member Avatar for Ancient Dragon
0
171
Member Avatar for asilter

>>what i want to be sure is, after function statements does the allocation space dissapear Yes because you sent the pointer by value and not by reference. You need to send a pointer to a pointer which requires two stars not just one. [code] Allocation(&ucBufr); void Allocation(unsigned char ** ucBufr) …

Member Avatar for Hamrick
0
127
Member Avatar for rajye

We are not a software factury where you can get the answers to all the programs you teacher might ask you to write. Think about what you are required to do then write an outline of the program. After that you should be able to code the program. only when …

Member Avatar for iamthwee
0
104
Member Avatar for Alfredito

[QUOTE=neuronimbus;422419]The URL given above is showing - Video is not available....[/QUOTE] The link works ok for me.

Member Avatar for x3mario
0
52
Member Avatar for The Dude

That's all we need are more laws to do stuff that we already have sufficnent laws. Animal cruelty is already illegal and has done very little to stop it. So that makes you think more laws will help ??? Its not the job of our police to protect the animals …

Member Avatar for quintoncoert
0
249
Member Avatar for WolfPack

[QUOTE=cscgal;366398] Does anyone else want them back as well? [/QUOTE] No, can't say that I would find them useful. I do, however, use "Posts Since Last Visit" and "Todays Posts" a lot.

Member Avatar for Dani
0
121
Member Avatar for hoceandress

>>i'm just trying to check my code u all if it's correct does it do what its supposed to do ? If yes, then its ok. If not then you need to fix it. One problem though is that your program will produce data overflow errors if the value of …

Member Avatar for vijayan121
0
134
Member Avatar for ramavundela

[QUOTE=ramavundela;421901]i didn't know about c graphics,unix,linux.but with my knowledge i want to do a project.can i ?[/QUOTE] Forget about doing any projects for now -- juist concentrate your efforts on learning the language. You can read books (see your local library for free copies), get online e-books, or read links …

Member Avatar for TkTkorrovi
0
89
Member Avatar for ananthxp

>>if suppose an device Its "a device" -- see [URL="http://andromeda.rutgers.edu/~jlynch/Writing/a.html"]these grammer rules[/URL] >>is this possible in c? Yes. I think you will have to write a device driver. But you first have to decide what operating system you want to use. MS-Windows you get the [URL="http://www.microsoft.com/whdc/devtools/ddk/default.mspx"]Windows DDK [/URL](Device Driver Kit).

Member Avatar for Ancient Dragon
0
103
Member Avatar for Marine

But you can never achieve the oridinal number of digits even when you set the precision to something larger, such as 30. The most cout will display are 15 digits. Probably have to use some other math libraries, maybe boost, for that huge number of digits.

Member Avatar for SpS
0
219
Member Avatar for gaurav252

I hate it when teachers teach undefined behavior. :angry: The value of [b]j[/b] will depend on the compiler you are using because the language does not define the behavior of [b]i[/b].

Member Avatar for Ancient Dragon
0
206
Member Avatar for venomlash

It depends on the compiler and the operating system. You can use an os-independent compiler such as QT which as gui support for *nix, MS-Windows and MAC (others I don't know about). Or you can use os-specific libraries such as win32 api function and MFC class for MS-Windows. There are …

Member Avatar for venomlash
0
193
Member Avatar for php111

did you read the [b]Read Me[/b] thread at the beginning of this board? If not, then you should. >> Is there any free tutorials in C that is very good No. If you are serious about learning the language then buy any of the many books available at your local …

Member Avatar for Ancient Dragon
0
125
Member Avatar for Elfshadow

The posted code is not really much of a benchmark program and will not adequately make the test you want with it because the programs are just too trivial.

Member Avatar for Ancient Dragon
0
276
Member Avatar for avgprogramerjoe

There are millions of examples because they are frequently used in every-day applications. But a simple introduction might be to write a function that sets all the bytes of a character array to 0. Function prototype might be [code] void clear_array(char* array, int size); [/code]

Member Avatar for SpS
0
303
Member Avatar for tejeshv

See this MSDN article -- scroll down the page to the section [b]Communications Resources[/b] >>Also please let me know how to test on the second PC after transferring data from the first PC. You need to write the software yourself that will run on each PC. On PC #1 write …

Member Avatar for Ancient Dragon
0
149
Member Avatar for sjewenp

>>how do i initialize it if i don't know how many names there will be? If you use c++ vector class you don't need to know how many names because that class will expand and contract as needed. >>if i want to write a sort function, how to i call …

Member Avatar for Lerner
0
278
Member Avatar for roflol

that's because the loop is wrong. You don't need to use eof() at all [code] while( getline(inData, line) ) { size++; // do other stuff here } [/code]

Member Avatar for vijayan121
0
202
Member Avatar for Dave Sinkula
Member Avatar for ~Ken Esquire~

Ok you have the function prototype, now create a structure with the required data members and a pointer to the head of the linked list. After that fill in the function you posted with the code. Read some of the other threads here and you will find several similar examples.

Member Avatar for Ancient Dragon
0
79
Member Avatar for fabiog

see the link near the bottom of [URL="http://www.deitel.com/Books/CPlusPlus/CPlusPlusHowtoProgram6e/tabid/2046/Default.aspx"]this page[/URL]. But I don't know if it is free or not.

Member Avatar for Ancient Dragon
0
139
Member Avatar for amishosh

[URL="http://www.winprog.org/tutorial/"]Here [/URL]is another popular tutorial

Member Avatar for Ancient Dragon
0
287
Member Avatar for rakesrai

you will need to create a thread that just listens for and receives data from the socket then, when ready, sends a message to the main form thread that the data is ready. I assume QT has mechanism to send and receive messages among threads.

Member Avatar for Ancient Dragon
0
79
Member Avatar for NycNessyness

some compilers may support strupr() and strlwr() which convert the entire string, but its not standard. You can easily write such a function yourself.

Member Avatar for Aia
0
464
Member Avatar for krnekhelesh
Member Avatar for Ancient Dragon
0
206
Member Avatar for Dyamid
Member Avatar for mauro21pl

When you add the node to the list in get_input() add it to the tail, not the head. There are at least a couple ways to do that. 1) search for the tail of the list each time you want to add a new node to the tail, or 2) …

Member Avatar for Ancient Dragon
0
86
Member Avatar for mauro21pl

please re-read my answer to [URL="http://www.daniweb.com/forums/thread86279.html"]your previous thead here[/URL]. I already answered this question.

Member Avatar for mauro21pl
0
100
Member Avatar for toxicboy

The major problem you fase is the operating system you plan to use. MS-Windows and *nix will not permit programs to access the ports directly like that program you posted. Only MS-DOS will permit it. Search some of [URL="http://www.google.com/search?hl=en&q=serial+port+device+drivers"]these google links [/URL]to see it they contain anything useful to you.

Member Avatar for toxicboy
0
1K
Member Avatar for tygerberg
Re: Spam

I get spam in my email box several times a day. Don't recall seeing any about sex for quite some time now. Most of the ones I get now are like "How to make millions by doing nothing".

Member Avatar for quintoncoert
0
96
Member Avatar for hus2020

>>thanx for ur reply..but i am not familiar with fgets function.please help. Look it up in your text book or online. You can't learn to program if you have to ask us for every keyword and function you want to use. You can use google to find all standard C …

Member Avatar for Aia
0
81
Member Avatar for richerTextBox

Never heard of such a thing -- a printer that prints onto CD's ?? I can only assume you are not referring to a normal paper printer. If not, then you will probably have to contact the manufacturer for a programmers manual and device driver.

Member Avatar for Ancient Dragon
0
83
Member Avatar for mauro21pl

line 7: [b]your_name[/b] is a single character and you are attempting to use it as if it were a character array in line 41. Change the declaration in line 7 to be a character array. Or, better yet, since this is a C++ program change it to be std::string class …

Member Avatar for Ancient Dragon
0
149
Member Avatar for satya_mls

whether its working or not -- DO NOT DOWNLOAD THAT FILE. Never ever download a file with *.doc extension because it could contain nasty viruses, worms, etc.

Member Avatar for Ancient Dragon
0
47
Member Avatar for ndeniche

line 10 will cause program crash because no memory has been allocated for [b]name[/b] -- its only a pointer that points to some random memory location. Since this is a c++ program why don't you use std::string class instread? [code] include <fstream> #include <iostream> #include <string> using namespace std; int …

Member Avatar for Hamrick
0
132
Member Avatar for hapiscrap
Member Avatar for mauro21pl

>> temp->name=new_person[]; Is that line 130? You can not assign char arrays like that. You have to use strcpy() instead, like this: [code] #include <cstring> <snip> strcpy(temp->name,new_person); [/code] >> temp->next=Front; >> Front=temp; Circular reference -- is that what you really want ? It results in Front->next == Front, and you …

Member Avatar for Ancient Dragon
0
107
Member Avatar for lasher511

[QUOTE=jwenting;406492]To your parent you'll always be the little kid who has to have his diapers changed every few hours. Better get used to it, they'll still think of you (subconsciously) like that when you're 50 and they're 80 or so.[/QUOTE] Yup, that's right. My [b]baby[/b] girl is 38 years old …

Member Avatar for Serunson
0
789
Member Avatar for jaepi

If you use getline() on line 64 you will avoid the space problem. getline() will read the entire line, then you can separate it into comma-separated tokens. Line 61 is incorrect -- you should avoid using eof() like that because it will cause problems. Use getline() instead, something like this …

Member Avatar for jaepi
0
128
Member Avatar for tygerberg

Quite often working lots of hours is counter-productive. I recall a couple times I put in 72 hour days and the solution hit me after I finally went home. Working 80-hour weeks often is a bad bad idea because the mind needs a period of rest and relaxation. If your …

Member Avatar for Ancient Dragon
0
130
Member Avatar for dev.cplusplus

you could also make it a structure that contains a union, something like the VARIANT structure that is used frequently by MS-Windows compilers such as VC++ and VB. It looks like this: [code] typedef enum { UNKNOWN = 0, STRING, SHORT, <etc. etc. for each data type } DATATYPE; structure …

Member Avatar for Ancient Dragon
0
76
Member Avatar for asilter

If that is the binary representation of the integer, then just typecast it or memcpy() it. [code] char array[some_number]; int n = *(int *)array; or memcpy(&n, array, sizeof(int)); [/code]

Member Avatar for ashishtrivedi
0
3K
Member Avatar for n.aggel

use clock() to get the time before starting the algorithm and again afterwards, then subtract the two times. For example [code] clock_t start = clock(); // do something, such as call a function clock_t end = clock(); clock_t diff = end - start; [/code]

Member Avatar for n.aggel
0
141
Member Avatar for johnray31

The only problems I found were: 1. The structure [b]next[/b] was incorrect [code] typedef struct _nodeList { unsigned int pointCode; struct _nodeList *next; }NodeList; [/code] 2. right_configuration() must return a value.

Member Avatar for johnray31
0
99
Member Avatar for The Dude

[QUOTE=quintoncoert;416958]can one of you perhaps explain to me exactly why you believe global warming to be a natural event? especially since consensus amongst scientists is that it is a manmade event? .[/QUOTE] Simple -- its been going on for about 2-3 billion years now. And scientists have found evidence of …

Member Avatar for quintoncoert
0
125
Member Avatar for Giorgi

[URL="http://www.fedex.com/us/promo/food_import_regulations.html"]This[/URL] and [URL="http://www.fas.usda.gov/itp/ofsts/us.html"]this[/URL] are probably the places to start. But you may need the services of a lawyer to get specific information about the food you want to import.

Member Avatar for bobchrist
0
95
Member Avatar for The Dude

I wouldn't have lisened to that with or without the lyerics but I agree that AT&T should not have censored out thouse lines. Maybe the webcast editor will get canned or at least disciplined. Don't know if its grounds for a lawsuit or not.

Member Avatar for MidiMagic
0
173
Member Avatar for amishosh

The way I do it is somewhat like Hamrick suggested -- create a project then change the source file(s) as needed. I test out many of the programs posted on the C and C++ boards that way.

Member Avatar for Tight_Coder_Ex
0
78

The End.