15,300 Posted Topics
Re: 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] | |
Re: 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 … | |
Re: >> could some one help me. Yes, but only if you post your program. | |
Re: You asked google the wrong question. [URL="http://lmgtfy.com/?q=c+program+to+convert+hex+to+binary"]Try this:[/URL] | |
Re: try changing [icode]double *matA[][/icode] to [icode]double matA[][4][/icode] | |
Re: 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 … | |
Re: [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 … | |
Re: 1/3 is integer division which results in 0. Try 1.0/3.0 to get float division. | |
Re: Post your code because my eyes aren't good enough to see what's on your monitor. | |
Re: >>here c++ program I would never guess it from what you posted. If you are writing c++ then why are you using prinf() ? | |
Re: 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 … | |
Re: 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] | |
Re: 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 … | |
Re: >> 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? | |
Re: 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) … | |
Re: Check out [URL="http://forums.digitalpoint.com/"]Data Point[/URL] | |
Re: 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. | |
Re: 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] | |
Re: [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] | |
Re: That's just another silly conspiracy theory. Don't believe it. | |
Re: 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++) … | |
Re: 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. | |
Re: >> X newX = new X(); wrong syntax. should be [icode] X* newX = new X;[/icode] | |
Re: 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 … | |
Re: 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] | |
Re: >>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 … | |
Re: 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. | |
Re: you also need to add the = symbol [code] char *point[] [color=red]=[/color]{ "This is One", "This is Two", "This is Three", }; [/code] | |
Re: >>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 … | |
Re: [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. | |
Re: >>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. | |
Re: >>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 … | |
Re: >> 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: … | |
Re: 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 … | |
Re: I like vodka too, especially Black Russians. But, wo is me, I can't drink it any more. :( | |
From [url]www.heartattackgrill.com[/url] -- must be the world's biggest artery cloggers, cooked in pure lard. | |
Re: >>i am making a 3d first person what is that? I've heard of a 1st person shooter, but 3d??? | |
Re: >>[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] | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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, … | |
Re: 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". | |
Re: 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 :) | |
The End.