15,300 Posted Topics
| |
Re: yes, lean how to use sockets in your program. [URL="http://www.cs.rpi.edu/courses/sysprog/sockets/sock.html"]Here[/URL] is a simple tutorial that might get you started. | |
Re: mysql web site has lots of examples and also free MYSQL++ classes. | |
Re: [URL="http://en.wikipedia.org/wiki/Computer_engineering"]Computer Engineering (also sometimes given the title 'Electronic and Computer Engineering') is a discipline that combines elements of both electrical engineering and computer science[1]. Computer engineers are electrical engineers that have additional training in the areas of software design and hardware-software integration[/URL] | |
Re: [URL="http://mrbook.org/tutorials/make/"]Here[/URL] is a brief tutorial | |
Re: all I see is a small square in the upper-left corner of the window with I click that link. Is that what you are talking about? | |
Re: there are at least a couple ways you can approach the problem. 1. Read the whole file into an array as you posted. Then generate a random number between 0 and the number of lines read -- see rand() function. That can take a lot of memory if the file … | |
Re: why did you post string.h? that is a standard header file that is supplied by your compiler and you should not be changing it nor making a copy of it and adding it to your project. The problem is probably in mygetopt.c which you did not post. | |
Re: Read other threads on this board for many excellent discussions and suggestions -- shuch as [URL="http://www.daniweb.com/techtalkforums/thread23777.html"]this one[/URL]. | |
| |
Re: [QUOTE=jan1024188;332454] What about 64bit arhitecture? Will be there on Vista Win64 API? Jan[/QUOTE] I don't know if there will be a 64-bit version of Vista or not, but 64-bit XP is indication there will NOT be one because device drivers (such as for video) are few and far between. [QUOTE=jan1024188;332454]If … | |
Re: >>i tried if(*q=="") but it gave an error use single quotes with a space between them, like this: [inlinecode]if(*q==' ')[/inlinecode] | |
Re: >>but its not working properly what doesn't it do that you want it to? Not everyone has your compiler so you need to explain what it does wrong. Compile errors? executation errors? | |
Re: You must have another function in your program called GetComputerName(). Your code snippet compiled without error in a simple test program that only contains a main() function. | |
Re: you are compiling your program with UNICODE set. Turn UNICODE off by selecting Project --> Properties, Configuration Properties, General, then set the "Character Set" to "Not Set" | |
Re: sometimes books contain errors. please post the code you are trying to compile so we can help you. >>i am getting fed up we all feel that way at times. But don't give up. When you feel really frustrated, walk away for awhile and do something else, like watch a … | |
Re: It doesn't really matter what compiler you use, although Microsoft compilers are better at building MS-Windows GUI programs then Dev-C++. Current version of Borland C++ may be ok too, but I've never used it. | |
Re: you have to print the data at the same time you print the boxes. With standard C or C++ functions you can't first print the boxes then write over them with data. Do them both at the same time. | |
Re: your code is attempting to open the same file for writing multiple times. You can't do that because the same file can be opened for writing by only one program at a time -- write mode requires exclusive use of the file. What you want to do is create an … | |
Re: some comments as requested: lines 19 and 20 can be combined [code] cout << "\nEnter interest rate:";[/code] spacing and general program formatting style is pretty lousy. Indentation should be consistent throughout the program. put line 66 on the same line as line 64 then delete empty lines between. delete lines … | |
Re: test::open() is not the same function as the open function in that unistd.h. If you want to call the function in unistd.h than use the :: namespace operator, for example [inlinecode]::open(/* blabla */);[/inlinecode] HOWEVER, you are writing a c++ program then use c++ standard fstream objects instead of the very … | |
I loved this [URL="https://www.patriotadventure.com/wbt/index.html?bid=2203588&pid=16341685&adid=90264056&rid=0&hrf=http://www.msn.com"]Jeep commercial[/URL]. Not the normal commercial, this one lets you interact with the film, you get to chose among serveral alternate scenes in order to find the end of the commercial. I made it in 17 out of 44 possible scenes. | |
Re: [QUOTE=RisTar;330991]well i thought i should create a new array cause i have no idea how i can remove a number from the array using realloc ...[/QUOTE] locate the element that contains the value you want removed. Then move all lower elemenets up one place to overwrite that elemement. That will … | |
Re: >>fstream.open("i:\\markp\\cis223\\populated_places_us_sorted.txt"); fstream is a c++ class. You have to create an object of that type then call it's open method. Something like this: [code=c] fstream in; in.open("i:\\markp\\cis223\\populated_places_us_sorted.txt"); [/code] or a little simplier [code=c] fstream in("i:\\markp\\cis223\\populated_places_us_sorted.txt"); [/code] | |
Re: >>if(strstr(buf,"Source")) watch the spelling and capatilization. strstr() is case-sensitive meaning [b]Source[/b] and [b]source[/b] are not the same thing. [code=c] char *ptr; if( (ptr = strstr(buf, "source:") ) != NULL) { // increment the ip address following the colon ptr += 6; } [/code] | |
Re: you can use it in a switch statement [code] int b = 1; int c = 2; int d = 0; switch(a) { case '+': d = b * c; break; case '-': d = b - c; break; case '/': d = b / c; break; // etc } … | |
Re: >>i just started a class called Compiler Principles didn't your school require a book for that class? Or is this for some additional research your instructor requires? I have not looked but I would think there are some compiler design books at [url]www.amazon.com[/url]. >>i accidentally downloaded months ago how can … | |
Re: [QUOTE=Earendil;330768]Thanks for the help. From now on I'll just create blank projects without stdafx.h and stdafx.cpp. However, I'm still curious about the way stdafx.h works and why it needs to be included to .cpp files in the project other than main.cpp. Could anyone shed some light on this, please? It … | |
Re: [URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/carets/caretreference/caretfunctions/getcaretpos.asp"]GetCaretPos()[/URL] | |
Re: its a bad link -- doesn't work now. | |
Re: derived class declaration of the pure virtual function must be EXACTLY like that in the base class, minus the "= 0" part. You forgot the word virtual in the derived class. I find it easy to prevent that kind of error by copy-past from base class to derived class. | |
Re: so much for amusement. Thread is now closed. You may continue the sillyness in Geeks Lounge if you want. | |
Re: did you read [URL="http://www.daniweb.com/techtalkforums/thread67837.html"]this[/URL] FAQ and problems thread? | |
Re: TCHAR is just a macro that is defined to be either char* or wchar_t*, depending on whether your program is compiled with UNICODE or not. If not UNICODE then use just simple assignment to convert to std::string. If the program is UNICODE then use one of the conversion functions, such … | |
Re: They are two completly separate issues. There are example programs on MYSQL web site that show you how to use MSQL++. If you are new to win32 api programming then you have a bundle of learning to do. [URL="http://www.winprog.org/tutorial/"]Here[/URL] is a tutorial to get you started. By the time you … | |
Re: [b]argc[/b] is the number of strings in the [b]argv[/b] array. argv[0] is always the name of the executable program and will never ever contain a command-line argument. >>argv[i] + 3 all that does is bypass the first 3 characters of the ith string. The algorithm you posted doesn't work at … | |
Re: yes. depends on what operating system, compiler and graphics library you are using. c++ itself doesn't support anythijng like that. | |
Re: In USA that would be a question most 8th graders could answer. You will be pretty lost in programming if you do not have at least that level of mathametical skills. You should probably take a remedial math course to bone up on algrbra and trigonometry. and there are many … ![]() | |
Re: now that you stated your assignment problem, what are your questions? | |
Re: >>char b[7]={98,120,97,113,122,121,101}, what is that? If you want to create a char array, do it the normal way so that you don't have to look up those numbers in an ascii table. And you don't have to specify the length unless you want the array to be larger than the … | |
Re: you need to post some code that illustrates what you are trying to do. Newest c++ standards allow for creating arrays with variables, but some compilers may not support this. For example [code=c] int foo(int size) { char array[size]; } [/code] | |
Re: [QUOTE=Lazaro Claiborn;328655]Here is another example program that might help you: [URL="http://www.daniweb.com/techtalkforums/../code/showsnippet.php?codeid=661"]http://www.daniweb.com/code/snippet661.html[/URL][/QUOTE] And just how do you expect a program that just displays "Hello World" is going to sort an array? :eek: | |
Re: My computer also has two hard drivers. I have XP on the master drive and decided to install Fedora on the slave. I installed the duel boot option in Fedora but was unable to duel boot -- the computer always booted with XP. So I changed the CMOS option to … | |
Re: [code] [color=red]void [/color]CFoutTest::print(string text) { fout<<text; } [/code] Everything compiled ok for me except above in red. | |
Re: >>how I go about using the numbers generated here later on in the program 1. use global variables (not recommended) 2. make the variables part of a c++ class 3. pass the variables around as parameters to the function(s) that need them. >>way to get I to generate numbers with … | |
Re: The fflush on line 45 is non-standard and may cause undefined behavior. fflush() is for flushing output streams, not input streams. Is that a C or a C++ program? If it is supposed to be C then rename the file to *.c instead of *.cpp and the compiler will treat … | |
Re: what do you want to search for and what do you want to count? do you want to count the number of times "0012" appears in both lines (and the same for each of the other strings on line 1) ? one way to do it is to create a … | |
Re: [QUOTE=mattyd;326741]Nice and clean. Good way to manage your working projects, a "To-do" list then clean it up. I hate clutter [/QUOTE] Someone once wrote "cluttered desktop, cluttered mind. Clean desktop empty mind" :cheesy: My desktop is very cluttered. ![]() |
The End.