5,676 Posted Topics
Re: [QUOTE=kumarangopi;274377]Does we need turbo c software to run turbo c exe file? Hmmm sounds wierd! I wrote a program called chart.c in turbo c which is two header files like bimap.h ,xyz.h.When I compile,chart.exe is created.when i run chart.exe in some other machine, its not running unless tc sofware and … | |
Re: Output values that are key to the operation of the code (like [B]a[/B], [B]b[/B], and [B]c[/B]) at important decision points to see what values they contain. | |
Re: [QUOTE=Salem;274162]It's only crappy DOS compilers which ever had this, [/quote]What about crappy MSV-[I]whatever[/I]? It allows [INLINECODE]void main()[/INLINECODE] without a problem to this day, doesn't it? And OS/2's compiler didn't complain, either, if memory serves. [QUOTE=Salem;274162]...presumably because DOS was so crappy at dealing with the return value that nobody ever cared.[/QUOTE] … | |
Re: [QUOTE=pigeonfoot;274298][code] int* intArrayPtr; intArrayPtr = (int*) malloc(someSize * sizeof(int)); [/code] malloc always returns a void* which you can typecast to be anything you want to... [/QUOTE] See [URL="http://c-faq.com/malloc/mallocnocast.html"]this[/URL]... IOW, don't cast [I]malloc()[/I] | |
Re: [QUOTE=yneng21;273907][COLOR=seagreen]its a task dat's very difficult...i have to create my own prog. lang. for finals...can anyone plz help me?:eek: [/COLOR][/QUOTE] Yes we can. But you have to figure out what the language looks like and how it should work, and we can suggest corrections as you code it. And please … | |
Re: Don't need the compound [B]if[/B]. [INLINECODE]if ((intNumb % intDivider) == 0)[/INLINECODE] will suffice. | |
Re: Unfortunately it doesn't. C & C++ are ignorant of the screen. They only know that output goes somewhere without really knowing what's on the other side. | |
Re: You keep asking the same question over and over. Unfortunately, without knowing what the data looks like (as all responses have tried to ascertain) there's not much we can suggest. Figure out what the data looks like to the program, then the way to count the pulses will become apparent. | |
Re: [quote=Cerberus;272053]Can anyone point me in the right direction to how you can add highlighing to a source code text editor. I don't know what language it's going to be written in. Java or c++ perhaps. Thanks in advance.[/quote] I use VEdit (vedit.com). It can handle many languages, and if it … | |
Re: [quote=Harshita_garg;273488]Hi guys!!![/quote] HI! [quote=Harshita_garg;273488]Is it a good idea to attach my program with this msg???[/quote] Generally, yes. Be sure to read [URL="http://www.daniweb.com/techtalkforums/announcement8-3.html"]this about Code Tags[/URL]. Also, in English, sentences end in a period which is then followed by a [I]space[/I]. Don't write them like a web address. | |
Re: [quote=Bobbiegirl;267226]I tried this but am confused and received errors. [/quote] What errors? We can't help if we don't know what the errors are nor what the new program looks like. Remember, to output *s on the next line you have to output a '\n' at the end of the line … | |
Re: [quote=mjrels;273280]HI, Actually I have a problem since I cant read properly a file from visual basic. The file is generated in Binary but when I open the file appear this content : 8ø@ Lø@ ÀOø@ ÀOø@ @Mø@ ÀOø@ I dont know how can I convert each value. As you can … | |
Re: Also, haven't youe ever heard of formatting your code? It's unreadable without proper indentation. | |
Re: [quote=aznballerlee;272223]Okay, I will try that. Thoguht about it: Why would we be going backward in the loop? I want to shift the values to the right. What I want .. a[2] = a[3] [COLOR=red] <<First loop iteration[/COLOR] a[1] = a[2] [COLOR=red]<< Second iteration [/COLOR][/quote] OK, try this. Seriously.... Take a … | |
Re: [quote=Chaky;272646]Thanks for the info. I guess it's the story of my life. Always at the end of the line.[/quote] When we're clearing the swamp, I for one want someone else's butt between me and the alligators... Oops, did I just type that out loud? :eek: | |
Re: [quote=~s.o.s~;272168]For a well detailed and excellent algorithm see [URL="http://www.daniweb.com/techtalkforums/post269647-8.html"]HERE.[/URL][/quote] Thanks, [B]S.O.S.[/B] :o | |
Re: This works: [code] #include <iostream> #include <cstdio> using namespace std; int main() { char *t1 = "1234567"; int mm,dd,yy; sscanf(t1, "%2d%2d%d", &mm,&dd,&yy); cout << mm << " " << dd << " " << yy << endl; return (0); } [/code] The other oprion is [I]stringstream[/I] I suppose. | |
Re: Each character (letter, number, punctuation) has a numeric value. That value can be used as an index into an array of counters which you can increment for each character you read. | |
Re: [quote=sharky_machine;272538]Seconds would be the best for my needs...[/quote] Then all you need is the function [INLINECODE]time()[/INLINECODE] | |
Re: I may get grief from C++ afficianados but [I]printf()[/I] makes it very easy to align data into columns. And it [I]is[/I] C++. | |
Re: [quote=JRM;271404]I've put up some posts about the programming tools that I am currently using. So far, no takers. This makes me wonder what people who know what they're doing are using! [/quote] I generally use VEdit as my editor and Borland 5.5 as my compiler. But if the compiler I … | |
Re: [quote=linq;272100][B]Thank you to all of you! [/B] [B]I made a mistake, missed the line "and just repeat that three times" which Bench posted, or I could understand it earlier.[/B][/quote] Really!?!? Then maybe instead of wasting 6 hours, if you had just posted [I]your[/I] code, it could have been corrected in … | |
Re: [quote=Ancient Dragon;268842] Also C/C++ is not very good for reports -- COBOL (how do you spell Yuk!) is better for that.[/quote] Heck, C is better than C++ for reports... I disagree with the dissing of VB. Yes it's fairly simple to learn. Yes it's not as powerful as C++. But … | |
Re: You know, you could just keep adding to the same thread and make a psuedo catalog of these things... ;) | |
Re: I agree. Are they really teaching LET for VB? Or is this another version of BASIC? Maybe best in [B]Legacy and Other Languages[/B] [code] DO WHILE count < flipq LET num=INT(RND(0)*2)+1 IF num = 1 THEN PRINT "T" 'LET count = count + 1 [COLOR=red]' put this before the IF[/COLOR] … | |
Re: [quote=mandanainred;270178]I am working on an assignment to get an [B]intiger [/B]from user, find all [B]prime numbers[/B] smaller that it, and show all of them which dont contain a '1'. for breaking the [B]integer[/B] into digits, I am using " x / 10 % 10 " algorythem, but I as it … | |
Re: Hmmm: [quote][LIST] [*]There are 0 people in the U.S. with the first name Walt. [*]This name is not found in our database, this means the name is relatively uncommon.[/LIST][/quote] I tried it with Walter and it found me. But my brother is non-existant. Never liked him anyway... | |
Re: [quote=mim3;269226]ok thx where do i go to get started?[/quote] By contacting them. They will tell you what you need to do to access your space. | |
Re: Since you only have one DATA defined, simply remove all [I]data.[/I] from your code and add the definitions contained in DATA without the structure. IOW, where you have [inlinecode][COLOR=#993333]struct[/COLOR] DATA data;[/inlinecode] use [code] pid_t pid; [COLOR=#993333]int[/COLOR] lenth; [COLOR=#993333]char[/COLOR] buff[COLOR=#66cc66][[/COLOR][COLOR=#cc66cc]128[/COLOR][COLOR=#66cc66]][/COLOR];[/code] instead and remove the structure. | |
Re: [quote=cscgal;266182]I'm glad you're finding it more useful than it's predecessor.[/quote] Yeah, it's kool! But shouldn't it open in a new window -- like [search]links[/search]? (I had to try it out) | |
Re: A buddy of mine turned me on to Tom's CD. He's got one where the caller is trying to sell him a cemetary plot, and Tom takes the call as a sign he should commit suicide. It's a real scream! Tom decides to buy a plot and want's it on … | |
Re: You can't program an exuation using math format. You have to use computer format. [inlinecode]a(2+x)[/inlinecode] must be written as [inlinecode]a[B]*[/B](2+x)[/inlinecode]. You must explicitly tell the program to multiply with *. And be sure to put parentheses around every two terms. Don't assume [inlinecode]a + b * 3[/inlinecode] is the same … | |
Re: As [B]Ancient Dragon[/B] implied, with 400+ lines of code, could you just post the section(s) you're having trouble with? [quote=simmyhp;267627]1. I don't know why when I enter the number in, when it prints out the number, it becomes smilies or some kind of maths code. Please tell me what I … | |
Re: [quote=newbie2c++;267342]I am totally stuck on this problem and would love it if anyone knew how to help me fix it! Thanks for any input!!![/quote] When asking for help, you really need to [I]tell[/I] us what your problem is. We can't always guess. [quote=newbie2c++;267342] Here are directions: Write a program that … | |
Re: [quote=WolfPack;267425]Use [URL="http://www.cppreference.com/stdio/sprintf.html"]sprintf [/URL](or snprintf (if available this is the best )) to create a string in the form of "InputNumber%d", and pass that to the AnimationNodeInCreate function. [code] int i; char label[ 15] = ""; for (i=0;i<36;i++) { sprintf ( label, "InputNum %d", i ); mInputs[i] = AnimationNodeInCreate ( i, … | |
Re: [quote=Brent.tc;267201]Thanks for all the help so far, but I am a beginner and may have many more questions to come. How can I clear the screen (I knew my commands could make the program unusable on some computers without those, but I had no idea how to get around it.)[/quote] … | |
Re: Definitely cool. Although I expected it to keep going in further and show the Milky Way again... That woulda been neat! | |
Re: If you get the token 'A', that is the same as the number 65 (ASCII A == numeric value 65 In other words:[code] (char)'A' = (int) 65 (char)'B' = (int) 66 (char)'C' = (int) 67 (char)'D' = (int) 68 (char)'E' = (int) 69 etc. (char)'a' = (int) 97 (char)'b' = … ![]() | |
Re: [quote=aismm;266359]thank you for your help, except I am not a very bright person, so maybe I did it wrong again, because when I run the program, it runs into an error and basically aborts...[/quote] You know, I just talked to my mechanic about my car. I told him "my car … | |
Re: You have a problem understanding loops and arrays. You have [code] const int SIZE = 10;//size of array ... int array[ SIZE ]; [/code] Then your loop is defined as [code] for ( int counter = 0; counter <= SIZE; counter++ ) [/code] Array size is 10, you load [B]11[/B] … | |
Re: [quote=Mr.UNOwen;265067]Can I have both in at the same time? This is going to be used on a unix and MS system.[/quote] Actually you don't want to clear the screen. It's bad form and it's not portable, as you can see. Best to just leave it. | |
Re: [quote=Han1977;256585]I want to use frame because with static page whenever I add a new comic page then I need to add a new page and do a small editing to the rest of the other page. So when I reach 6th page I do 5 page small editing.[/quote] I assume … ![]() | |
Re: You also don't need the range in the IF's. For example [code] IF score > 90 ; this will take everything above 90... Display A ; Output grade and the IF is over else IF score > 80 ; this will take everything above 80... Display B ; anything above … | |
Re: >HERE IS WHAT I HAVE SO FAR, THANKS SO MUCH!! > #include <iostream> > #include <string> > using namespace std; > int main() > { > int number; > cout <<"Enter an integer to add: "; > cin>> number; > cin.ignore (1000,10); > while (number != 0) > { > … | |
Re: #1: Please stop bolding your messages. It isn't necessary. #2: The code you posted (here with CODE tags, use them please) was: [code] #include <stdio.h> #include <string.h> main() { char acbuffer[50]; int icount=0; clrsrc(); printf("Enter Any Word: "); scanf("%s", &acbuffer); strlen(acbuffer); for (icount=strlen(acbuffer); icount>0; icount--) { printf("%s\n", acbuffer); acbuffer[icount]='0'; } … | |
Re: You are somehow runing the function that adds the record twice. Could be that you have a couple ways to execute the function and because of the way your events are linked you run through the code twice. I see this happen when you link an update via OnChange event … | |
Re: You could set up another variable that increments each time your value wraps. That effectively gives you a 64bit counter. This of course would require some minor redesign every time your counter is accessed in the code. | |
Re: Or you could stay away from .NET so you have cross platform compatability and go with C++, C, Pascal, even Real Basic. | |
Re: Borland 4.5 is a 16 bit compiler. Upgrade to [url=http://www.borland.com/downloads/download_cbuilder.html]Borland 5.5[/url] for 32 bit. |
The End.