15,300 Posted Topics
Re: depends on the compiler and operating system. MS-Windows use[ gdi print functions](http://msdn.microsoft.com/en-us/library/windows/desktop/dd145192(v=vs.85).aspx) | |
Re: you could just copy the data files to an external hard drive. | |
Re: >I read the string back to decrypt, does not give the whole string back but truncate the string. Then you are opening the file incrrectly. Since the file contains embedded NULL bytes it must be opened in binary mode and use std::string's read() method. >when decrypting I can avoid them? … | |
Re: So what's your problem? We do not do homework for you, you post the code you have written and ask specific questions. Just posting your assignment does nothing. | |
Re: That means the function may return without a specific return value. When the condition on line 6 is false, what does the function return? Why not just rearrange it so the function aways return 0 on line 21. LONG APIENTRY Esl_CheckCMTClassRecord(struct CMT_Class_Record *ClassRecord, long *ret) { USHORT uResult; SHORT retcode; … | |
Re: instead of scanf() call rand() a[i][j] = rand(); | |
Re: yes, for example, the loop that starts on line 5 could be rewritten like below, which is more like what you might write in assembly programs. Although goto is not generally used in C programs, it does show your teacher that you understand how loops work. int i = 0; … | |
Re: what did you enter for a and b, and what were the results? | |
Re: Did you try it yet? The computer probably must have an installed version of Windows, that's why it's called "upgrade" afterall. | |
Re: line 27 - 30 can replaced by deleting the original file then renameing the temp file. It's not necessary to rewrite the data again. As for your specific question, can't answer that unless I have a copy of the file you are trying to work with. > on average about … | |
Re: Your compiler is too old to create the excel file directly, but you could create a \*.cvs file which can be read by Excel. \*.cvs file format is just a plain text file with tab-separated or comma-separated fields. | |
Re: You have to read the file just like it was written, each node occupies 5 lines in the file. So in the function that reads the file it has to read all 5 lines in order to find the id numbers | |
Re: You can't because both those functions only work on null-terminated strings. In your example, neither a nor b has enough room to hold more than one character. Then could be contantinated like this: char a = 'a'; char b = 'b'; char all[3]; all[0] = a; all[1] = b; all[2] … | |
Re: There are lots of free grid controls for MFC, [here](http://www.codeproject.com/Articles/8/MFC-Grid-control-2-27) is just one of them. [ Here](http://www.codeproject.com/search.aspx?q=mfc+grid&x=0&y=0&sbo=kw) is another list from codeproject.com, largest repository of MFC code on the internet. If all you want is a read-only control then you could do with the standard List control. | |
Re: click the "Edit Profile" link in the purple ribbon at the top of the screen, then there is a Password edit box next to your email address, which appears at the top of that screen. | |
Re: See answers to your other thread [here](http://www.daniweb.com/software-development/cpp/threads/437753/how-do-i-use-strncat-or-strcat-wc-style-strings-that-are-not-arrays) You call strcmp() to compare two character arrays, == doesn't work like it does for std::string class. To solve your problem you will have to first combine the two characters like I showed you in your other thread and then call strcmp() to … | |
Re: See [this thread](http://www.daniweb.com/community-center/daniweb-community-feedback/threads/430782/rankings-in-daniweb) | |
Re: delete lines 26-31 because they are do-nothing lines. They are not calling any functions within class Bike, but just predeclaring global functions that your program never uses. | |
Re: I don't find it all that useful, I think it's more convenient to just use the menu bar that appears across the top of the page. | |
Re: >I use char ledStatus instead of BYTE ledStatus. is there any difference?? BYTE is defined by Microsoft windows.h as unsigned char. line 3: what is "staio.h"? is it "stdio.h" misspelled? >but the code doesn't work. What to you mean by that? Does WriteFile() return success? Yes or No. Does your … | |
Re: >is there any chance it will accidentally generate the same primary key more than once No. The dbserver I used from Sybase would lock the table before writing anything to it. Table updates are queued up in the system and processed one at a time in sequence. You really need … ![]() | |
Re: [Link](http://think-like-a-computer.com/2012/04/17/boot-bcd-0xc000000f-windows-7/) | |
Re: also post the complete error message -- it tells you what function(s) is/are missing. | |
Re: You posted your solution, but is there a question somewhere? | |
Re: Post the code you tried, otherwise can't help you. In the OPENFILENAME structure, make sure lpstrFile points to a character array that you created and the first byte of that array is '\0'. | |
Re: [QUOTE=thekashyap;392055]Couldn't help but notice that unless there is some bug in daniweb.com this is most read thread I've seen so far.. ! 17,751 times.. :)[/QUOTE] :cool: :sweat: you need to report that to Dani | |
When I want to copy all the code into the clipboard all I do is double-click then copy. That works ok. But what if all I want is a few lines of the code to paste into an existing program? There is no way to do it because when I … | |
Re: >my IDE says the thread exits with a code 0 0 normally means the program ended with no errors, it ended normally. What is your program not doing correctly? | |
Re: The whole purpose of critical sections is to block out other threads while inside the code bounded by critical section. If other threads were allowed in then the critical section concept would be useless. Critical sections are pieces of code that are shared among threads -- I see no such … | |
I have a copy of Visual Studio 6.0 just sitting in a box in my desk at home and have not used it for several years now because its too old. Any ideas how to make something useful with it or what to do with it, except toss it in … | |
Re: Here's the correction, you can't combine all that like you did //Now we just do some variable minipulate incase the user decided to enter a full name inital = inital.substr(0,1) + "."; inital[0] = toupper(inital[0]); //return the inital return (inital); } | |
Re: line 22: The loop is running once too many times which overflows the array. Should be i<MAX_TEXT_ROWS and not i<=MAX_TEXT_ROWS. Same problem in other similar lines in your program. Arrays always start at 0, so the last valid member of an array is MAX_TEXT_ROWS-1. | |
Re: In Windows Explorer right-click on the folder, select Properties from the drop-down menu, then check the Hidden checkbox. It's not possible to hide them from anyone with Admin rights. | |
Re: you can divide by subtraction. Try out a few examples using pencil & paper to find out how its done. Or read [this tutorial](http://www.homeschoolmath.net/teaching/md/division-repeated-subtraction.php) | |
Re: what are the eror(s)? Line up the { and } so that they are in the same column on the screen. Same for case statements, they should not be indented like they are shown in your post. Something like this example. Note: Your post will keep the spacing if you … | |
Re: >Sorry, but most of us have worked to hard to learn this stuff just to give it away for nothing I usually offer to do it only after they deposit $1,0000,000.00 USD in my PayPal account :) | |
Re: We will HELP, but we won't write it for you. Post some code to show us what effort you have made to write the program, then ask specific question(s). Start out by creating a character array of 16 questions and their answers. Then in main() create a loop that asks … | |
Re: Why don't you just delete lines 4, 6 and 8 then add an ELSE COMMIT TRANSACTION after line 13? That puts everything in the same transaction. ![]() | |
Re: probably because the loop on lines 17 and 43 either 1) overflows the size of the arrays or 2) overflows the largest value that can be stored in an int, or 3) or both 1 and 2. Do the math manually with pencil & paper and you will see what … | |
Re: Another option is to create another thread that calls Sleep(15\*60\*1000) (15 minutes) in a tight loop. | |
Re: > if( marks >=0.00 && marks <= 39.99 ){ That may not work in all situations. What if marks == 39.991 (which could easily happen with floating-point math on compters). None of the conditions apply so no grade will be assigned. What you should do is something like this: if( … | |
Re: The best solution is to use threads -- but Turbo C is too old for that. Either get a new compiler (free) or forget about your program. | |
Re: I just got the same error message when I tried to upload a file. Also, why can't I upload \*.cpp files (The filetype you are attempting to upload is not allowed) | |
Re: your quote is not right character=getch() -- notice that getch() is a function call It retrieves a single character from your computer's keyboard buffer. | |
Re: It's all in the file extension. \*.c files are read as C programs. | |
Re: Unless you are told to do otherwise you don't swap the entire nodes when sorting the list, just swap the data so that the pointers remain unchanged. Some instructors won't let you get away with it that easy though, so you need to ask him/her. | |
Re: That is a common file format for a \*.ini file used by many MS-Windows programs that contain startup information. You can't store the data directly into a variable using fscanf(). Instead you have to call fgets() to get a line of text, find the colon in the line, then call … | |
Re: It might be useful for just browsing the forums, such as when a student is in class and wants to search for something. But even then it would be difficult to read a long-winded post with lots of code. | |
Re: It should be a simple program if all you want to do is enter the data from the keyboard and store the info in a text file. Just declare a few data items for each of the things you want in the text file, print a prompt for each, and … |
The End.