15,300 Posted Topics

Member Avatar for bigOnotation

lines 13, 43 and 50: C language does not require you to typecast the return value of malloc(), but c++ does. line 27: Attempting to dereference a pointer that has never been initialized. Remove the star in front of temp should fix that. [icode]temp = *head;[/icode]

Member Avatar for bigOnotation
0
123
Member Avatar for Tiago Santos

I used a Zebra printer a few years ago that was attached to a wireless barcode scanner from Symbols Technologies. At that time we wrote a C program that send the contents of the *.lbl file directly to the printer via the scanner's rs232 port. If this is what you …

Member Avatar for Ancient Dragon
0
217
Member Avatar for anbaarasan

>> could some one help me. Yes, but only if you post your program.

Member Avatar for Ancient Dragon
0
24
Member Avatar for likhitha

You asked google the wrong question. [URL="http://lmgtfy.com/?q=c+program+to+convert+hex+to+binary"]Try this:[/URL]

Member Avatar for Ancient Dragon
0
49
Member Avatar for Alice_Blue
Member Avatar for Narue
0
130
Member Avatar for Udxero

you need to create two functions that do what your instructions told you to do. Then move the code you have on lines 38-44 into function A and lines 50-59 into function B. Lastly, change what you now have on line 38 to call function A, and change what you …

Member Avatar for shasha821110
0
252
Member Avatar for winrawr

[QUOTE=ArkM;803802]Look at: And never do that, it's a way to nowhere: - No type check (evidently why) for variadic argument lists. - No way to check up the end of argument list in called function[/QUOTE] I don't have a problem with variable arguments function in limited instances where the function …

Member Avatar for ArkM
0
513
Member Avatar for rudasi

1/3 is integer division which results in 0. Try 1.0/3.0 to get float division.

Member Avatar for rudasi
0
158
Member Avatar for Stefano Mtangoo

Post your code because my eyes aren't good enough to see what's on your monitor.

Member Avatar for Stefano Mtangoo
0
86
Member Avatar for shamila08

>>here c++ program I would never guess it from what you posted. If you are writing c++ then why are you using prinf() ?

Member Avatar for shamila08
0
114
Member Avatar for jln555
Re: John

Welcome to DaniWeb John. There are several of us old-timers here.

Member Avatar for Robdale
0
43
Member Avatar for RexxX

Do you need all those files in memory at the same time? [icode]char arr[15][100][/icode] will only hold 15 strings, each string can contain a maximum of 99 characters + null terminator. So about all you might get in that array is the first line of text that is contains in …

Member Avatar for Ancient Dragon
0
110
Member Avatar for billchow24

just use stream's >> operator on an integer, it will convert negative sign for you to make the value of the integer negative. [code] ifstream in("file.txt"); int n; in >> n; [/code]

Member Avatar for Ancient Dragon
0
56
Member Avatar for KarthikOnIT

what do you mean by "low privilege" ? Low executation priority ? If so then forget it because all that will do is cause your server to get little, if any, cpu time even when needed. Better to put the server into a wait state until an event occurs, such …

Member Avatar for Ancient Dragon
0
80
Member Avatar for ahihihi...

>> telling you if you give $19 , she will tell you 6 lucky numbers which can make you win million dollers :) what a scam ! does she guarentee those results?

Member Avatar for Salem
0
87
Member Avatar for mumneedshelp
Member Avatar for CPPRULZ

line 10 is wrong. Why is value a pointer? From the class constructure it appears to be just a single integer, and you don't need a pointer for that And get rid of those stars on line 10. [code] class box{ public: int value; box() { value=0; }; box(box &c) …

Member Avatar for death_oclock
0
151
Member Avatar for Hugers
Member Avatar for massivefermion

Oh you want something like a gui Progress Control, but just for text mode program. You would probably want to put the code for that in another thread while the main program (thread) is doing other things.

Member Avatar for ArkM
0
138
Member Avatar for ozan

you might investigate [URL="http://www.boost.org/"]Boost libraries.[/URL] I'm not sure they have just what you are looking for. [URL="http://letmegooglethatforyou.com/?q=matrix+c%2B%2B+libraries"]Or try this[/URL]

Member Avatar for ArkM
0
165
Member Avatar for Rabia Iqbal

[URL="http://www.codeproject.com/script/Forums/View.aspx?fid=1647&msg=1798591"]read this thread[/URL] [URL="http://www.di-mgt.com.au/dbxanalyzer/dbxapi.html"]And this[/URL]

Member Avatar for Rabia Iqbal
0
114
Member Avatar for The Dude
Member Avatar for GrimJack
0
183
Member Avatar for vivekc++

you can't use the comma operator to declare variables of a different types -- they must all be the same type. So I'd code it like this (making the iterator global to the function instead of just the loop): [code] list<int>::iterator itr = bob.begin(); for(int i=0;i<3 && itr != bob.end();itr++,i++) …

Member Avatar for Ancient Dragon
0
174
Member Avatar for ace_man

its the same as sorting integers. If they are c style character arrays then call strcmp() instead of the < or > operators. If std::string then you can use the same operators. Otherwise there is no difference.

Member Avatar for Ancient Dragon
0
60
Member Avatar for zgulser
Member Avatar for Ancient Dragon
0
122
Member Avatar for NenadL

1) struct L1 and struct L2. Since the structures are identical except for the names you could just one struct for both purposes. No need to declare two structures that do the same thing, just reuse one struct. 2) >> if(strcmp(a->string,b->string)) { strcmp() returns 0 if the two strings are …

Member Avatar for Ancient Dragon
0
376
Member Avatar for ryan858

If you use fstream its >> operator will skip all spaces and tabs for you, so that all you get are words. [code] ifstream in("in.txt"); std::string word; while( in >> word) { // do something with this word } [/code]

Member Avatar for ryan858
0
96
Member Avatar for voider72
Member Avatar for amerninja2

>>So in C++, using Something like Unix Sockets or Winsock with C++ lets you use things like TCP/IP. But it only lets you connect to an IP within your router when its by itself. False. Try making the address something like this: "http://www.DaniWeb.com" and you can connnect to it via …

Member Avatar for amerninja2
0
1K
Member Avatar for monkey_king

Microsoft stopped supporting makefiles beginning with VC++ 2005. Instead they have solution files which you can use to do command-line compiles. But first you will have to use the IDE to create the solution file. It also has its own version of make, but I don't recall its name.

Member Avatar for Nick Evan
0
104
Member Avatar for Sharanpreet
Member Avatar for gemni7

you also need to add the = symbol [code] char *point[] [color=red]=[/color]{ "This is One", "This is Two", "This is Three", }; [/code]

Member Avatar for Ancient Dragon
0
107
Member Avatar for delerium12345

>>I'm sorry, I didn't realize I couldn't upload the exe file - but I have it ready to email. That's ok We don't want you uploading exe files because (1) they can contain viruses and worms and (2) we can compile the code ourselves on our local computer to test …

Member Avatar for Ancient Dragon
0
510
Member Avatar for Doctor Inferno

[QUOTE=Doctor Inferno;717486]This is game is simple. You just rate how well you know or recognize the person above you on a scale of 1-10.[/QUOTE] I don't like this thread -- that's what reps are all about.

Member Avatar for ahihihi...
0
130
Member Avatar for Dontais

>>while (tokenPtr!='NULL') Remove the quotes around NULL. [icode]while (tokenPtr!=NULL)[/icode] >>char checkCount[20]; You should make that a lot bigger. A 20 character sentence is pretty darned short.

Member Avatar for Dontais
-1
85
Member Avatar for jrw0267

>>anyone have any suggestions? Post your complete program that illustrates the problem you are having, and also tell us what operating system and compiler you are using. It's possible you might need to call flush() at the end, such as [icode]cout << "Hi" << endl;[/icode] (note that endl also calls …

Member Avatar for jrw0267
0
62
Member Avatar for skitzo315

>> First, I need help setting my char array defined in my class to "null" within the default constructor. That's an easy one. All you do is flood the entire buffer with 0s. [code] class person //class of persons { protected: char name[80]; //person's name short age; //person's age public: …

Member Avatar for Ancient Dragon
0
154
Member Avatar for skprasat

wouldn't it have been a lot simpler to have coded it with a loop [code] int i; printf(\nThe Result is : "); for(i = 0; i < 7; i++) printf("%s ", var[i]); [/code] >>whats wrong in my code..... how did you declare and initialize array var ? Most likely the …

Member Avatar for axyelp
0
114
Member Avatar for The Dude

I like vodka too, especially Black Russians. But, wo is me, I can't drink it any more. :(

Member Avatar for jbennet
0
45
Member Avatar for Ancient Dragon

From [url]www.heartattackgrill.com[/url] -- must be the world's biggest artery cloggers, cooked in pure lard.

Member Avatar for Ene Uran
0
40
Member Avatar for tomtetlaw

>>i am making a 3d first person what is that? I've heard of a 1st person shooter, but 3d???

Member Avatar for _adam_
0
182
Member Avatar for number87

>>[pid,perm,dir,owner,group,size,date,file] = strtok(s," "); What in the world are you trying to do here? strtok() only returns one string, not multiple strings. [code] pid = strtok(s," "); // first time perm = strtok(NULL, " "); dir = strtok(NULL, " "); // etc etc for each of the others [/code]

Member Avatar for death_oclock
0
128
Member Avatar for beanryu

we don't have enough of the code to tell you what is wrong. lines 14, 15 and 16: you are making that much more difficult than it needs to be. [icode] puts(factsPtr->valuePtr->predicate);[/icode] But without the rest of the code I can't be certain the above is actually correct. In any …

Member Avatar for Salem
0
151
Member Avatar for reaven

yes -- read each line sequentiall from star to finish until you get the line you want. use fstream's getline() to read an entire line then check only the first word to see if the line is the one you want. Don't attempt to code all of that at one …

Member Avatar for Comatose
0
249
Member Avatar for Salem
Re: TV

There is a great deal of truth in that video. I have dish network tv with over 100 channels to choose from, and there are days when there isn't a thing that I want to watch.

Member Avatar for jbennet
0
64
Member Avatar for NexusX

The main problem is use of globals. Delete the globals, delete unneded clear_foo() function, and your program works as you expect it to. [code] #include <iostream> #include <string> #include <sstream> using namespace std; string int_to_s(int, string&); string cypher(string); int main() { string foo; int number = 123; cout << int_to_s(number, …

Member Avatar for NexusX
0
117
Member Avatar for Marquita-Jensen

Welcome to DaniWeb Marquita. >>I married him, not signed up for Joey & Marquita Jensen enterprises. Good for you :) Don't let your husband's consulting business turn into "the other woman".

Member Avatar for Robdale
0
121
Member Avatar for The Dude
Member Avatar for serkan sendur

1) I guess you found it because you posted here :) 2) don't know 3) People with green squares can give you at least 1 rep point. People with black give 0 because they don't have enough posts yet, people with red or yellow have negative rep. 4) LOL :)

Member Avatar for Nick Evan
0
140
Member Avatar for priyasha2009

RDBMS -- is that Raima Data Base Management Sytem? If yes, the last time I used it about 15 years ago it was a hierarcy instead of sql database. When you buy (with your $$$) the db Raima provides examples and tutorials.

Member Avatar for Ramy Mahrous
0
85

The End.