5,676 Posted Topics

Member Avatar for Kevin Jose

[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.

Member Avatar for iustitia
0
137
Member Avatar for Sabryan
Member Avatar for the rider

[url=http://www.borland.com/downloads/download_cbuilder.html]Try this link[/url]. It's just a teeny more advanced than your compiler.

Member Avatar for carolannberdin
0
112
Member Avatar for GooeyG
Member Avatar for GooeyG
0
112
Member Avatar for Ancient Dragon

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 …

Member Avatar for Geekitygeek
0
157
Member Avatar for ze_viru$

#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; }

Member Avatar for ruwaiz1028
-3
3K
Member Avatar for stephshyzach

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?

Member Avatar for WaltP
0
150
Member Avatar for wesduncan
Member Avatar for chubbs1900
Member Avatar for shaileqs90

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 …

Member Avatar for James cuck
0
328
Member Avatar for lucy1234

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 …

Member Avatar for Adak
-5
2K
Member Avatar for Ezzaral

[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 …

Member Avatar for ~s.o.s~
3
297
Member Avatar for MareoRaft

[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 …

Member Avatar for MareoRaft
0
3K
Member Avatar for skshoyeb
Member Avatar for Stony

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 …

Member Avatar for dusktreader
0
244
Member Avatar for psuspect

[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! …

Member Avatar for bluntaxe1
0
538
Member Avatar for fedya
Member Avatar for uday jha
0
611
Member Avatar for Hafsa0110

[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 …

Member Avatar for ananda2007
0
180
Member Avatar for Moe

[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.

Member Avatar for John Marcos
0
2K
Member Avatar for Ancient Dragon
Member Avatar for creeps

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 …

Member Avatar for [Alpha]-0mega-
0
200
Member Avatar for mjmythili

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.

Member Avatar for Ancient Dragon
0
885
Member Avatar for Sesshokotsu

[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 :)

Member Avatar for soulcandra44
0
172
Member Avatar for rahulrulez
Member Avatar for ika_rees
0
659
Member Avatar for gpleonar

[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.

Member Avatar for harshmore
0
416
Member Avatar for dragontruong

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"); …

Member Avatar for jihan sultana
0
165
Member Avatar for skiabox
Member Avatar for bunty_kkp

Did the OP really need 4 posts that say exactly the same thing? C'mon, people, one post is enough.

Member Avatar for Nick Evan
0
243
Member Avatar for george_82
Member Avatar for chade25

[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 …

Member Avatar for chade25
0
144
Member Avatar for Ershad K

[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 …

Member Avatar for Ershad K
1
7K
Member Avatar for viwenka

[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?

Member Avatar for UncleLeroy
0
195
Member Avatar for krap_nek

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?

Member Avatar for xwolfjack
0
3K
Member Avatar for allnillin

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.

Member Avatar for allnillin
0
1K
Member Avatar for Duki

[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 …

Member Avatar for dream party
0
349
Member Avatar for hking

Let's see -- you've read the names and you've read the votes. What do your instructions say to do next?

Member Avatar for mike_2000_17
0
248
Member Avatar for sourabhtripathi

[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 …

Member Avatar for jaaz....
0
306
Member Avatar for nosson
Member Avatar for finalheavenx

Look at each number and save the highest number entered. Did you miss reading the Rules?

Member Avatar for dusktreader
-1
3K
Member Avatar for dapcigar

> 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** …

Member Avatar for Adak
0
335
Member Avatar for archana.c07

[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 …

Member Avatar for Software guy
0
261
Member Avatar for fizzle

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.

Member Avatar for fizzle
0
167
Member Avatar for Shikhin

[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 …

Member Avatar for Shikhin
0
92
Member Avatar for cktbrd

Convert the first 2 characters (0 & 1) into an integer Convert the next 2 characters (2 & 3) into an integer etc.

Member Avatar for kings_mitra
0
272
Member Avatar for mamashi
Member Avatar for technology

[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?

Member Avatar for ShadowScripter
0
197
Member Avatar for spring sun

In your [ICODE]main()[/ICODE], look carefully at your [ICODE]if[/ICODE] statement...

Member Avatar for technology
0
221
Member Avatar for xinyonz

[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?

Member Avatar for WaltP
0
140
Member Avatar for WaltP

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) + " " …

Member Avatar for vb5prgrmr
0
190
Member Avatar for Amoblaze

Since no one has yet even touched on the command line, [url=http://www.gidnetwork.com/b-45.html]see this[/url]

Member Avatar for WaltP
0
207

The End.