5,676 Posted Topics
Re: [QUOTE=eranga262154;428681]I wrote one as follows. [CODE]string line; ifstream fileread ("[I]path to the binary file[/I]"); while(! fileread.eof()) { getline(fileread, line); cout << line << endl; } fileread.close();[/CODE] Well I read a binary file using this, the command prompt is really mad. It,s not displays as a binary code, I mean bunch … | |
![]() | Re: [QUOTE=iamthwee;277446]I don't know, perhaps you can ask dani to change it? In fact it wouldn't be such a bad idea if it were got rid off altogether. Hmm, oh well.[/QUOTE] I have. No support. |
Re: [QUOTE=amishosh;429051]One more thing... Forget threads for a moment. My wife runs a business with many customers and contacts, and needs a database type application. I want to put my C studioes into practice. Will this be a good practice for me or a waist of time?[/QUOTE] Eating a bunch of … | |
Re: [QUOTE=Chaky;428324]I want to be nearly The Quee..... King of Daniweb.:zzz:[/QUOTE] That's a lofty goal for [I]an unknown quantity[/I] :icon_wink: | |
Re: [QUOTE=Tight_Coder_Ex;426653]That being said, Intel is quite liberal with their documentation so there is no reason M$ couldn't have an equal or better compiler.[/QUOTE] There's a good reason. They're M$. This generation's IBM. If they could program like they market, you'd be right. But all they really have going for them … | |
Re: [QUOTE=Lost in Code...;426429]I found out what the deal was.... instead of creating a new source file, i created a new project. When creating a new file, my tool writes this in the file as part of the template: [CODE]system("pause");[/CODE][/QUOTE] Edit the template to get rid of that awful command. I … | |
Re: Actually, you don't need to understand allocation at all. The instructions say: [QUOTE=Mdizzle;425006]The file contains 10 columns and many lines. ... It is assumed that number of students is no more than 100[/QUOTE] So all you need is an array of 100 lines of 10 columns. If you know structures, … | |
Re: It used to be. Try asking at [url]http://www.borland.com/newsgroups[/url]. Someone there should know... | |
Re: [QUOTE=iamthwee;425263]The problem is unlikely to be with their code but rather ... you're using the outdated version of turbo c, which is probably very likely :)[/QUOTE] So you claim that the [I]outdated[/I] versions of C/C++, like Turbo, never handled strings correctly? :icon_rolleyes: Or is it that after new versions came … | |
Re: In general, you have to assign a specific date to be your ultimate beginning date. Then you calculate the exact number of days from that day to the day entered by the user. Then you can calculate the day-of-the-week from that value using the [I]modulus[/I] (%) operator. | |
Re: It's a secret message you're to authorized to read... :icon_twisted: | |
Re: At the end of your code, you have [code=c] cout<<"\nPlease enter +,-,*, or / and then two numbers,\nsepperated by spaces, that you wish to\nadd,subtract,multiply,or divide.\n\nType e and press enter to exit."; cin>>choice; if (choice != 'e') { calc(choice); } } [/code] This will only run the calculator once. Change the … | |
Re: Or use an older compiler, like [url=http://bdn.borland.com/article/21751]Turbo 1.01[/url] or [url=http://bdn.borland.com/article/20841]Turbo 2.01[/url]. | |
Re: Create your post in an editor. When done, copy and paste the entire post into the edit box. Hit PREVIEW and fine tune your post. Simple. | |
Re: [QUOTE=joshSCH;355378]haha.. I was just joking.. I'm a realist.. So I've got to say that no, I do not believe we have made any contact with other life forms. [/QUOTE] Why is being a [I]realist[/I] counter to life forms contacting us? There's some logic missing here... [QUOTE=christina>you;355456]Yeah, I don't believe in … | |
![]() | Re: looks fine up to main. But because of the lack of code tags, I can't tell what's going on after it. Try reading [url=http://www.daniweb.com/techtalkforums/thread78223.html]this[/url] for your next post, or the words on the input box background that you ignored when you typed over them. |
Dani, could we have a control panel option to shut off the mouseover display please? The display really gets in the way, covering multiple posts so we can't see what other posts are available. I for one find it extremely annoying. | |
Re: [QUOTE=asilter;423873][code] 105(decimal) = 01101001(binary) [/code]for example, i want to skip first 3 bits of binary and get the number to the right and assign it to an integer:[code] 01001(binary) = 9 (decimal) [/code]could you plz give a little code sample? thanx.[/QUOTE] Set a mask to clear the first 3 bits: … | |
Re: Actually, I don't understand it, either. The shifting and adding 64 makes no sense. Since a deck has 52 cards, the loop is going through all the possible cards of the deck (0-51). Then [INLINECODE](i / 13)[/INLINECODE] gives you 0-4, representing the suit of the given card. [INLINECODE](i % 13)[/INLINECODE] … | |
Re: Or add a progress bar or textbox to the modal form to display the progress. As an added safety, disable any 'dangerous' buttons while the command is being executed. | |
Re: [QUOTE=~s.o.s~;420361]This notification thing is killing me. [/QUOTE] Let me kow when the funeral is.... :icon_twisted: | |
Re: Looks like someone still hasn't read [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] yet. And [url=http://www.daniweb.com/techtalkforums/thread78223.html]this[/url] is also very helpful. | |
Re: [QUOTE=Hamrick;418691]Pointer strings always end with a '\0' character so calling strlen to find the end just slows the whole function down. This is a good pattern to get in the habit of using. [code=c] for ( i = 0; s[i] != '\0'; ++i ) { /* Do stuff with the … | |
Re: [QUOTE=Arctic wolf;417995]And when I replace the double variables with integer ones it suddenly beggins to work(there is a huge bug with that,but it works) ,maybe somebody can explain?)[/QUOTE] The only way this can happen is the file contains integers, not doubles. | |
Re: What [B]wee[/B] is saying in his own way is you [I]must[/I] do something before we can help you. All we can do with the info you've given is write it for you. Please read [url=http://www.daniweb.com/techtalkforums/thread78223.html]this[/url] as well as [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]The Forum Rules[/url] ![]() | |
Re: My advice is to tell us what the errors are. the more you explain the problem, the better (and faster) we can help you solve it. | |
Re: [QUOTE=happygeek;412567]It isn't, at all, just the opposite. We rely upon members such as yourself reporting bad posts and spam to help us keep on top of the problem. I am discussing this with Dani to see if anything can be done... However. It should be noted that the drive behind … | |
Re: #1: Please learn to [url=http://www.gidnetwork.com/b-38.html]format your code[/url] so we can read it. #2: You added a line to the input file. Where did you add the [I]read[/I] for that line? | |
Re: [QUOTE=Ptarila;413392]how do i build a graphical user interface in visual c++[/QUOTE] [QUOTE=iamthwee;413421]Since you never mentioned OS I'd go for OpenGL.[/QUOTE] How many OS's does Visual C++ work under? Another DUH moment... :icon_wink: | |
Re: Yes, you can get [url=http://www.daniweb.com/techtalkforums/thread78223.html]help[/url] here. | |
Re: [QUOTE=nubbie;413266]i'm suppose to key in 2 value , but need to display error whenever character is entered. thus end the program. can i still able to string all of them?[/QUOTE] You've been given 3 examples. Maybe you should try to [I]use [/I]one of them. | |
Re: [QUOTE=JRM;411696]A word of advise... Use a post title that asks a real question and "texting English" is frowned upon here.[/quote] Almost. Don't ask the question in the title, tell us what the question is going to be about, like "[I]Compiler Error[/I]". [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]Read this[/url] [QUOTE=JRM;411696]I am not familiar with your compiler, … | |
Re: [QUOTE=EnderX;300570]That's the problem. I'm not sure if what I have is source code or not; that line makes me think it is, but the vast majority of the file weighs in against the sourcecode theory.[/QUOTE] Why would you think it's source code? You claim most of the file is unreadable. … | |
Re: [QUOTE=zandiago;403631]Why am I receiving the following errors: 'seenBefore' : function does not take 1 arguments[/quote] [INLINECODE]bool seenBefore(int, [B]int *[/B]);[/INLINECODE] [QUOTE=zandiago;403631]syntax error : missing ';' before '}'[/quote] Depends on where the error is. This is why we ask you to post the [I][B]exact[/B][/I] error message, in full! | |
Re: What would be used to decide that there's code? The only script I've seen is for C/C++ and looks for {, which means if your post includes a brace but no code, you have to put code tags somewhere anyway... And what criterion would be used for other languages? I … | |
Re: [QUOTE=GaryD.;411744]about the fflush, I know its wrong but I guess since I'm a beginner it's easier to just tell me to use that while learning the basics since portability will be an issue later...[/quote] And after you've learned to use it, and after time forget that it's wrong, what are … | |
Re: [QUOTE=sk8ndestroy14;363409]I'm going to Cedar Point next Friday with my Physics class. It's great cause there are no lines. Everyone's at work or school. But their new roller coaster The Maverick messed up on one of its last test runs. It won't be running for a month so we won't get … | |
Re: [QUOTE=tformed;409263]I am working off the code that the professor provided, but for some reason I cannot get it to work. It is giving me errors. --- the error I recieve are the following: 1>source.cpp(5) : error C2653: 'xy_coordinate' : is not a class or namespace name 1>source.cpp(7) : error C2065: … | |
Re: [QUOTE=darkscript;400613]The idea here is to make each character in the string exist in every position, for example: string is "JOY" so taking J:- 1st pass: "JOY" 2nd pass: "OJY" 3rd pass: "OYJ" taking O:- 1st pass: "OJY" 2nd pass: "JOY" 3rd pass: "JYO" taking Y:- 1st pass: "YOJ" 2nd pass: … | |
| |
Re: It's because in the code [code] void someStrFunc(const char *str){ char *tmp; strcpy(tmp,str); return; } [/code] [INLINECODE]tmp[/INLINECODE] is just a pointer and has no space assigned to it. Therefore you are copying the string into unknown memory outside of your program space. The same thing is happening with [code] int … | |
Re: [QUOTE=dr4g;404287]You can also use system("PAUSE"), [/QUOTE] NO!!! [url=http://www.gidnetwork.com/b-43.html]Here's why[/url] [QUOTE=dr4g;404287]DevC++ puts this in for you automatically, [/QUOTE] Only if you don't correct the template, which IMAO everyone should do. [QUOTE=dr4g;404287]i'm not sure about linux at all since i don't need to use it on Linux :)[/QUOTE] And here's one major … | |
Re: [B]long[/B]s are numbers [B]""[/B] is a string constant You can't mix the two. | |
Re: [QUOTE=christina>you;395183]Anyone ever heard of this crazy "magician?"[/QUOTE] Of course. [QUOTE=christina>you;395193]Yeah. He's so fake I think. Or he's been practicing witchcraft.[/QUOTE] Neither. He's a [url=http://en.wikipedia.org/wiki/Magician_%28illusion%29]magician[/url]. | |
Re: [QUOTE=howdoyoudothat?;399403]whats a .dat file?[/quote] Generally a [B]dat[/B]a file, used to hold info a program is to process [QUOTE=howdoyoudothat?;399403]whats a .dll file?[/quote] A file that a program loads while running to add additional functions and procedures. In essence, a set of a system functions that are available to the program that … | |
|
The End.