15,300 Posted Topics
Re: You don't really do it in c++ any more than you did on *nix. [URL="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&source=hp&q=program+to+image+hard+drive+in+windows&btnG=Google+Search"]Here are some links [/URL]to programs that will image the hard drive. | |
Re: line 48: you must specify a data type, such as [icode]int Array[ARRAY_SIZE];[/icode] line 50: You need to specify data type here too. line 55: remove that semicolon at the end of the line. line 56: Need opening brace {. Add closing } at the end of the loop. line 61 … | |
Re: The file was read on lines 28-30, why are you trying to read it again on lines 34-37? And line 37 will just read all the numbers into the same element of Array. My guess is that on lines 34-37 you need to just display the contents of the array … | |
Re: You shouldn't feel so bad [quote] Overall Post Quality Score: 34% Up Votes Total Up-Votes Received: 899 Unique Posts Receiving Up-Votes: 776 Individual Members Who've Up-Voted: 268 Posts Currently Positive: 62 Down Votes Total Down-Votes Received: 6509 Unique Posts Receiving Down-Votes: 1481 Individual Members Who've Down-Voted: 40 Posts Currently Negative: … ![]() | |
Re: First of all, you only have ONE birthday -- the day you were born. After that they are the Anniversary of your Birthday. My family (wife and two children) celebrates the anniversary of our birthdays all at the same time because we are so close (within 30 days). We have … | |
Re: Favorite IDE: VC++ 2008. Code::Blocks close second. M$ has the best debugger on MS-Windows I've ever seen. When on *nix I use VI and gdb, recently started using Code::Blocks on *nix. Graphics library: ON MS-Windows I love MFC. It's difficult to learn, about a year's learning curve. I've dabbled with … | |
Re: You need to read the answers given on other forums before starting new threads. See [URL="http://www.dreamincode.net/forums/index.php?showtopic=145379&hl="]this link[/URL] if you forgot. | |
Re: The first thing you should do is initialize BlockDataType array with all 0s before doing anything else with it -- that will clear the array of all random data. Now lin line 14 fwrite() will write 0s for all unused bytes in that array. fwrite() will write blocksize number of … | |
Re: You are trying to do it the hard way [code] #include <iostream> #include <algorithm> #include <vector> #include <string> #include <fstream> using namespace std; int main() { vector<string> movieList; ifstream in("myfile.txt"); if( in.is_open() ) { string line; while( getline(in, line) ) movieList.push_back(line); sort(movieList.begin(), movieList.end()); vector<string>::iterator it = movieList.begin(); for(; it != … | |
Re: you have to declare them [b]extern "C"[/b]. [code] #ifdef __cplusplus extern "C" { #endif // C function prototypes here #ifdef __cplusplus } #endif [/code] You will find this example in stdio.h as well as other c header files that may also be used in c++ functions. | |
Re: Already got my Christmas present this year -- Samsung 55" 400+ Hz LED TV, Blue-Ray DVD player, and Bose speakers. | |
Re: coding out large blocks of code. I like to use [icode]#if 0[/icode] because its easier to find the end of it. [code] #if 0 some code here #endif [/code] Otherwise the way I code is pretty consistent with the link you posted. | |
Re: you could redirect the output to a file. Then your other program just read the file like it does any other file. Below I put the output in separate files, but you can put them all in the same file too by use >> instead of > [code] ping google.au … | |
Re: Why can't you do that yourself? The loop starting on line 38 is poorly written. Note the use of < symbol instead of <=. Arrays are indexed from 0 up to but not including the number of elements in the array (variable len in this case) [code] for(i2 = 0; … | |
Re: gotoxy() is a function only supported by Turbo C and Turbo C++. No other compiler in the whole wide world supported it. So if you want to use a different compiler then you will have to find a different way to accomplish the same thing, such as write your own … | |
Re: [QUOTE=emptiness;1076307]I have actually dlownloaded some alienskins and wares from site, [/quote] I have no idea what you are talking about. [QUOTE]therefore later the control panel never worked. everything was enlarged to the absurd extend. [/quote] You mean the fonts on your display screen are too large? [QUOTE]Needed help but no … | |
Re: [QUOTE=abebudi;1076309]I dont know how to start, but I enjoy to join this forum. Thanks for accepted me.[/QUOTE] Welcome to DaniWeb, but most newcomers post this in the [URL="http://www.daniweb.com/forums/forum165.html"]Community Introductions forum[/URL] | |
Re: Just as well -- VS6 doesn't work well with Vista or Win7. Better off upgrading to VS8 or VS2010 | |
![]() | Re: If all you want to do is play games or surf the net, then don't waste your hard-earned money on the ultimate edition -- the Home Premium edition works great for those. You can't buy Vista any more so the argument between Vista and Windows 7 is now mute. |
Re: [QUOTE=apurv;298338][B]If u want...:?: [/B] [B]I hav both these programs[/B]:cool:[/QUOTE] After 1 1/2 years do you think the op really gives a dam?:mrgreen: | |
Re: I really miss that list of frequently visited forums. I was about to start a new thread here about it, but glad I read this thread first :) Hopefully Dani will put it back. And while we're at it -- I'm starting to like that [b]NEW[/b] button Dani added to … | |
Re: You have to include wininet.h and shlobj.h, then compile the program for UNICODE | |
Re: What (or who) is tinypaste.com ? | |
Re: line 55: should be }, not { lines 59, 60 and 61: just delete them. line 25: If you want to display double quotes then you have to escape them, like this: [icode] cout << "Enter \"P\" for Power or \"S\" for Square Root";[/icode] line 28: put surround P and … | |
Re: Add this to the bottom of that program to verify that it worked (works ok for me on Windows 7 using VC++ 2008 Express compiler) [code] ifstream in("myFile.dat", ios::binary); int k = 0; if( in.is_open() ) { in.read((char *)&k, sizeof(int)); cout << "k = " << k << '\n'; } … | |
Re: >>if(!cookieOrdered.compare(flavors[i])) You can just simply write this: [icode]if( cookieOrdered == flavors[i] )[/icode], assuming [b]flavors[/b] is an array or vector of strings/character arrays.. >>cookieOrdered.clear(); Could also be: [icode]cookieOrdered = "";[/icode] line 8: There is really no point in using an iterator in that function. Just use a loop similar to line … | |
Re: >>.any ideas? Any ideas about what? You sort of lot me with all that description. | |
Re: Each row has 5 seats, but you don't know how many rows there will be until runtime. So the first thing you need to do is to declare a 2d array with unknown number of rows and columns, like this: [icode]char **rows = NULL;[/icode] Now after asking how many rows … | |
Re: summer -- I hate snow and ice in the winter because it makes driving so hazardous. | |
Re: [QUOTE=candaceusa;1070045]Ladyqween you question is not complete. I couldn't make out what you meant here. Sorry[/QUOTE] It was spam. | |
Re: Delete line 2 -- it is more harm than good. Replace all the rest of that code with this single loop. When the '@' is found I don't know what you want to do, so the code below will just display the entire text. [code] string line, check; while( getline(fin, … | |
Re: What are you going to do with the rest of the line if the Name is more than 29 characters? Is it supposed to ignore the rest of the Name characters (skip over the excess characters) and read in the remaining characters? If that is true, then after line 76 … | |
Re: You can always click the "Unanswered Threads" link on the right side of the screen. | |
Re: replace all 7 loops with something a function [code] void GetMartks(std::string prompt, float& mark) { cout << prompt << '\n'; cin >> mark; mark = decimal(mark); } [/code] And call it in main() like this: [code] GetMark("T1:", a[n].vert.t1); GetMark("T2:", a[n].vert.t2); GetMark("T3:", a[n].vert.t3); GetMark("T4:", a[n].vert.t4); GetMark("T5:", a[n].vert.t5); GetMark("T6:", a[n].vert.t6; GetMark("T7:", a[n].vert.t7); … | |
| |
Re: >>Can someone please help me with this? Can we do what to help you ? Post the code you have written, compiler's error messages, and ask questions. We are not going to write the program for you. | |
Re: First create an array of month strings [icode]char *months[] = { "January", "February", "March", // etc etc }[/icode] Now all you have to do is index that array with the month-1 [icode]string Name = months[m-1];[/icode] where m is a numeric value from 1 to 12. | |
Re: You need to sort the array twice. First time, sort the rows. When a swap is needed you need to swap all the columns on the row so that the column data stays with the rows. Then resort the array by columns. When a swap is needed you need to … | |
Re: Read some of [URL="http://www.google.com/search?hl=en&client=firefox-a&channel=s&rls=org.mozilla%3Aen-US%3Aofficial&hs=lGp&q=calling+c+from+vb.net&aq=2&oq=calling+c+from+v&aqi=g5"]these links [/URL]how to call C functions from VB. | |
Re: I have 64-bit HP computer, 5 Gig RAM and 750 Gig HD. At first I tried to install 32-bit Windows 7, but it had all sorts of problems because I had too much RAM and too large a HD, so I wound up erasing that and starting all over with … | |
Re: You don't need to pass the length of each of those strings. The concat function can easily find the lengths itself. Here is how to make concat() return the string [code] string concat(const char* title, const char* fname, const char* lname) { string fullname; // concat all three names not … | |
Re: x1.error is not 0.1 -- its 0.100000001. [code] bool operator==(const real& x1, const double x2) { // after substituting: 0.1 <= 0.1 is true! bool b; double x = fabs(x2-x1.value); printf("x = %0.15f, x1.error = %0.25f\n", x, x1.error); if( x <= x1.error ) b = true; else b = false; … | |
Re: line 23 and 29: You can't add an node that's allocated on the stack to the linked list. Reason: when the function returns the memory address of that node is destroyed and becomes invalid. To fix this you need to call malloc() to allocate memory for the node from the … | |
Re: Where did you get that crappy code from??? Toss it out and forget it. >> myend = &MyArray[MAX_SIZE]; Wrong -- myend is set to point one element beyond the end of the array, a common mistake. should be [icode] myend = &MyArray[MAX_SIZE=1];[/icode] >>first = (MyLL *) mystart; Illegal operation. mystart … | |
Re: Are you looking for c++ code or pseudocode? [code] declare three integers, one for age, one for sum of ages, and third for number of ages entered. in a loop prompt for age update sum update counter end of loop average age is sum divided by counter [/code] | |
Re: you have to print each field individually [code=c] printf("name: %s\n", Doom3.name); printf("memory: %d\n", Doom3.memory); ... [/code] | |
Re: An array and a list are two different things. Its a lot easier to sort an array than linked list. | |
Re: line 32: you are using the wrong operator; use == to test the two characters, not = which is assignment operator. Same problem on line 43. | |
Re: turbo c++ is just too old, it won't even run on Windows 7 or Vista on PC. Get Code::Blocks, MinGW, or VC++ 2008 Express. |
The End.