5,676 Posted Topics
Re: [QUOTE=manzoor;507175]since printf() is a c function I can;t understand it :)[/QUOTE] Sure you can. It's obvious if you think about it. | |
Re: [url=http://www.borland.com/downloads/download_cbuilder.html]Try this link[/url]. It's just a teeny more advanced than your compiler. | |
Re: What makes you think so? 200 * .09 = 18 18 + 200 = 218 Exactly what was printed. | |
Re: Could the bullets on the rules be changed to numbers? That way we can reference [I]exactly[/I] which rule was violated. In SPAM-FREE: [I]Do not mention, plug or refer to any product, service, or website you are affiliated with anywhere outside of Business Exchange forums [b]which are[/b] specifically designated for this … | |
Re: #include <iostream> int main() { int x; std::cout << "Enter number: " << std::flush; std::cin >> x; if (x != 5) std::cout << "Wrong" << std::endl; else std::cout << "Right" << std::endl; return 0; } | |
Re: Isn't it [B]exactly[/B] the same for this forum as all other forums? If so, how could you post here? If not, what's different? | |
| |
Re: If you want to do that, do it. Output the loop index. | |
Re: The way this site works is 1) You ask a [I]specific question[/I] that can be answered. 2) You post the code segment that you are working on that doesn't work 3) You explain what it's doing wrong 4) You explain what it should be doing 5) Add any additional details … | |
Re: It's called a breadth-first search. From your starting position (which is the first entry in the solution array), generate and test every possible move in the next free array locations. Keep track of the parent (array[0]). Move to the next position (array[1]) and generate all moves from that position. Keep … | |
Re: [QUOTE=cscgal;] > Font/table size on the forum thread listings is still huge. Large, but not huge ;) This is by design and I currently don't have any plans on changing this one. Sorry!![/QUOTE] Please explain your reasoning, since us users consider it [I]huge[/I]. We are at a loss trying to … | |
Re: [QUOTE=MareoRaft;]I'm actually quite interested in a robust method if you don't mind. I want to build good habits as a programmer.[/quote] Good habits as a programmer start with understanding the functions you are using and using them properly to get the results you want -- not by searching for a … | |
Re: Use the manual for Borland 4.5 for the commands you need. Not the web. | |
Re: It seems to me that your program is defined above -- each function and it's algorithm -- in your first post. You can almost convert those steps directly into code. The only thing that's missing is your main() which processes your initial loop from [COLOR=#000000]4 to 1000.[/COLOR] Although I'd change … | |
Re: [QUOTE=psuspect;339269]I have this program that counts characters in a string is there a way to modify this code so that for example it counts specific characters entered. Exmaple.. user entered Hello, and I wanted the program to say there are 2 "L"''s entered in that word. THanks for your help! … | |
Re: [QUOTE=Ranju09;1094918]what is data type specifier[/QUOTE] Google? Your book? | |
Re: [QUOTE=Hafsa0110;1122389]hello! just started out here... i need help with this program i need to generate a 3*3 matrix having unique numbers in the range 1-9. I did this program using srand but i'm unable to get the correct output...i couldn't figure out the error...could someone plz help me?? here the … | |
Re: [QUOTE=leelanc;1130501][B]hey i have done the use case for this prob stmt. wat u ve done has lots of mistake.. if u want den let me knw........ll mail u d diag................[/B][/QUOTE] Very bad start.... Do not post any email addresses on any forum. | |
Re: Use the curlys. An alternate of version 1, and the format I prefer: [code=C] while(1) { if(1) { i++; } } [/code] I personally find that in your original style I tend to loose the {, but in this version the block is visually better defined. Again, my [I]preference[/I]. Both … | |
Re: So basically, no. All [I]sizeof[/I] does is give you the size of the array, not the number of elements entered. You have to count as you insert. | |
Re: [QUOTE=Aia;851237]Are you saying you have been giving incorrect solutions all this time?[/QUOTE] No. She doesn't [I]give[/I] solutions. She gives help... with a side dish of attitude :) | |
Re: Yes we can. Did you read the Member Rules or any of the sticky posts above? | |
Re: [QUOTE=DrAgon PrinceSS;1147435]LOL. wht can i say .. i just started c++ and made this prog today.![/QUOTE] Say you're sorry, don't do it again, and [I]Read the Member Rules[/I]!!! Violating the rules will get you banned from the site. | |
Re: This might help [CODE=c] #include<stdio.h> int main() { int ary[10] = {1,3,5,8,12,54,2,77,49,12}; int *ptr; int i; ptr = ary; // set the pointer to the address of the array for (i=0; i<10; i++) // add the index to the pointer { printf("%d ", *(ptr+i)); // ptr remains unchanged } printf("\n"); … | |
Re: Change [I]number[/I] to [I]long[/I] and see what happens | |
Re: Did the OP really need 4 posts that say exactly the same thing? C'mon, people, one post is enough. | |
Re: Or get image processing software like Photoshop Paint Shop Pro Gimp | |
Re: [QUOTE=chade25;1286663]First let me say, please don't post code back all fixed. If you see where the error is, just tell me where it is and I will look to find it. Thanks, much appreciated![/QUOTE] Where [I]what [/I]is? Don't you think it would be helpful to tell us what we're looking … | |
Re: [QUOTE=manish.ranjan;1218064]It is running very well on my side...... go through your header files folder....some files may be missing the program and logic both are very correct...!![/QUOTE] Wrong, they are NOT correct. Please see the OP's question: "[I]in Linux using g++ compiler ... [B]getch and _getch is not working[/B].[/I]" What part … | |
Re: [QUOTE=viwenka;]Can anyone help me with my code?! I need to do a programm binary to decimal converter without using library, just stdio.h my code works wrong [/quote] It does? Think it might be helpful to [I]explain[/I] what it does wrong? | |
Re: Well, for the line [B]34012 Philip Morris Lisbon Milan 01[/B] you read:[code=c] if ( fscanf(file, "%5s %50s%10s%10s%3s", p[i].id_num, // 34012 p[i].Name, // Philip p[i].Departure, //Morris p[i].Arrival, // Lisbon p[i].Day) == 5 ) [/code] Now, what changes seem obvious? | |
Re: Help with what? You need to explain whatever problem you are having. You also need to [url=http://www.gidnetwork.com/b-38.html]format your code[/url] because, as posted, it's unreadable. | |
Re: [QUOTE=jbennet;322240]well my computing class is composed of 27 lads and no girls whatsoever. Over the whole department theres only about 8 girls to roundabout 300 guys i think that proves our point....[/QUOTE] One department in one school proves very little... Using that logic: [color=blue][b]3 [/b][/color] proof that all numbers are … | |
Re: Let's see -- you've read the names and you've read the votes. What do your instructions say to do next? | |
Re: [QUOTE=sourabhtripathi;1216213][CODE] int a[10]={3,45,6,78,89,334,4,77,54,60}; int *p=a; [/CODE] what will *p++ do ? as ++ has more priority than * therefore ++ will be executed fisrt ? but its postincrement so it will happen after change of line or statement. so will it increment the pointer or increment the value hold by … | |
Re: [QUOTE=nosson;]Is there a way to delete the thread???[/QUOTE] No | |
Re: Look at each number and save the highest number entered. Did you miss reading the Rules? | |
Re: > I'll try to use them (code tags) from now on, didn't know it before, so thanks again Really? At the top if this forum are the following posts: * Read This Before Posting * Please use BB Code and Inlinecode tags Additionally info is listed in **The Forum Rules** … | |
Re: [QUOTE=archana.c07;]Hi all, I am trying to conver string to decimal. the sting is 8 byte long and contains data as hex nembers e.g 0000000000000D72 i want to conver this data into decimal as 3442 i'm not getting how to do this help me...[/QUOTE] How do you do it with pen … | |
Re: Except for using [iCODE]feof()[/iCODE] ([url=http://www.gidnetwork.com/b-58.html]see this[/url]) the code looks fine. More info is needed. | |
Re: [QUOTE=Shikhin;]Hello, I am trying to make a program which will sort a array of 10 elements using bubble sort. I searce dthe forum and google but douldnt find a problem similar to mine. [/QUOTE] You're kidding, right? No one site that explained how the Bubble Sort works sorted numbers? I … | |
Re: Convert the first 2 characters (0 & 1) into an integer Convert the next 2 characters (2 & 3) into an integer etc. | |
Re: Do what [B]abhimanipal[/B] said. | |
Re: [QUOTE=ShadowScripter;] (STDIO HEADER) [URL="http://www.cplusplus.com/reference/clibrary/cstdio/scanf/"]scanf( const char * format, ... )[/URL] [CODE=CPP] string mystring; scanf("%s", mystring); [/CODE] [/QUOTE] Not a valid solution -- unless you want the ability to crash at will. [url=http://www.gidnetwork.com/b-62.html]See this[/url]. And since when does [iCODE]scanf()[/iCODE] work on C++ Strings? | |
Re: In your [ICODE]main()[/ICODE], look carefully at your [ICODE]if[/ICODE] statement... | |
Re: [QUOTE=xinyonz;]What sort of program i should write?[/QUOTE] How about a C++ program that reads a line, pulls out the data you want, and outputs that data? | |
I've been trying to find out the error returned from [iCODE]MkDir[/iCODE] to no avail. [iCODE]Err.Number[/iCODE] is 0 and I can't find any other error mechanisms available. [CODE] On Error GoTo mkError MkDir txtDir(Index).Text On Error GoTo 0 Exit Sub mkError: On Error GoTo 0 Text1.Text = Str(Err.LastDllError) + " " … | |
Re: Since no one has yet even touched on the command line, [url=http://www.gidnetwork.com/b-45.html]see this[/url] |
The End.