5,676 Posted Topics

Member Avatar for bpushia
Member Avatar for wdearth

[url=http://www.gidnetwork.com/b-56.html]See this[/url]. You do not want to use [iCODE]gets()[/iCODE]. It's dangerous. And your [I]s2[/I] definition is OK since you have it defined at 30. [B]Dragon[/B] misread your code. And [ICODE]strlen()[/ICODE] returns the length of a properly formatted string.

Member Avatar for TrustyTony
0
169
Member Avatar for toferdagofer

#1) Forget the game board. Just work on input of the guess and output of the result. Isn't that the important part of the game? #2) I don't see a class defined anywhere. That's probably why you can't get it correct. My suggestion: [B]a)[/B] Write the class and code to …

Member Avatar for TrustyTony
0
330
Member Avatar for Sorcher
Member Avatar for neverine

Please find someone to help you translate your question into English. The translation program you are using creates unintelligible giberish.

Member Avatar for neverine
0
125
Member Avatar for penguino138

You can't use 'normal numbers' like [I]int[/I]s or [I]long[/I]s. You need to come up with a system that allows you to compute 1 number at a time. Using arrays for each number where each array element holds 1 digit of the numbers might work for you.

Member Avatar for Derek Elensar
0
915
Member Avatar for penguino138

Of course. Read the string from the user. Use the string as the filename. No magic about it. Let me change your question and the answer to this is how you wold do the filename thing, too: [QUOTE=penguino138;]Hi. I was wondering if there was a way to have the user …

Member Avatar for penguino138
0
279
Member Avatar for garber

[CODE]Start xLow at 50 start count at 0 while xLow not 90 add 1 to count increment xLow [/CODE] Is this really that hard?

Member Avatar for mir wasif
-1
3K
Member Avatar for Tursup

You need to look up the format of the IF statement. Not one of them is even close to being correct.

Member Avatar for TrustyTony
0
135
Member Avatar for FanionGolfer

I have a novel idea -- talk to your teacher? I remember them helping me when I was in school.

Member Avatar for debasisdas
0
100
Member Avatar for israruval007

Does your [I]getData()[/I] function work? If it doesn't, you don't need to work on the print function yet. When programming, take it a step at a time.

Member Avatar for Lerner
0
157
Member Avatar for vikrantk
Member Avatar for TrustyTony

Write it up and post it here. If it makes sense, Dani can move it where it will do the most good.

Member Avatar for WaltP
0
220
Member Avatar for madmhan84

[QUOTE=madmhan84;]...but I have one problem[/quote] No, you have many problems. 1) Using bold, underline, red text, lines of hyphens to make your post look cute. It's unnecessary and distracting. By the way, you forgot to use [I]italics[/I]. 2) Your formatting is bad -- [url=http://www.gidnetwork.com/b-38.html]see this[/url] 3) [iCODE]void main()[/icode] -- [I]main()[/I] …

Member Avatar for WaltP
0
229
Member Avatar for pepperhead11

[QUOTE=pepperhead11;1550247]Ok, I've been trying to run this program on Borland C++ (Version 5.0A). The program is a Point of Sale program. I keep getting the errors "expression syntax at (121,26)" and "If statement missing ) at (129,6). Try as I might, I can't seem to fix the errors. [/QUOTE] I …

Member Avatar for WaltP
0
1K
Member Avatar for darkdai

Look up and learn the file/directory commands that your compiler or OS use. An example would be something like the functions [I]findfirst()[/I] and [I]findnext()[/I] available in some compilers.

Member Avatar for WaltP
0
96
Member Avatar for gcardonav

I wouldn't "read" the second IF either if I designed it that way. Assuming your files will always be in sorted order as you posted them: [CODE] Read from file in1 Read from file in2 loop until EOF cmp = compare in1-line with in2-line if < read in1 again else …

Member Avatar for WaltP
0
211
Member Avatar for shima.khanehzar

[url=http://lmgtfy.com/?q=snake+game+code]Here[/url]. Stop being so lazy.

Member Avatar for kayhantolga
-1
85
Member Avatar for joru819

[QUOTE=joru819;]So I made some changes and got everything operational but the logic is wacked out. It seems like when I get bust to work draw doeskin. Not just these logical evaluations but the whole series that states the outcome of the game. I have never had so much trouble with …

Member Avatar for abhimanipal
0
108
Member Avatar for JohnBoyMan

Another rule of thumb: Add to you code [iCODE]cout << "ptr-> " << struct->member << "\ndot. " << struct.member << '\n';[/iCODE] Which one outputs correctly? That's the one to use. And figure out why. In no time you'll understand it.

Member Avatar for WaltP
0
86
Member Avatar for gruffy321

[QUOTE=gruffy321;]i just have to ask, ...would you consider being taught about files and records in Pascal a good way of learning about files records (or i think they are called structs or typedefs in C) for use in C. I dont think so......... but would love to know an opinion …

Member Avatar for WaltP
0
224
Member Avatar for cableguy31

Google: [url]http://rabbit.eng.miami.edu/info/functions/time.html#gtod[/url]

Member Avatar for template<>
0
374
Member Avatar for Khoanyneosr

Unless I completely misinterpret you, no, you are making sense. What doesn't make sense is creating a file for each person. If you have 1000 people in your contact list, you're going to have 1000 files. This will make your program slow and use a lot of system (disk) resources. …

Member Avatar for Khoanyneosr
0
146
Member Avatar for shyla

Without proper [url=http://www.gidnetwork.com/b-38.html]formatting,[/url] your code is extremely difficult to read. Repost with good indentation.

Member Avatar for Moschops
0
555
Member Avatar for naseerhaider

To make the program better, put the 'work' in a loop. That way you only need one % and /. When the number is 0 the loop is finished.

Member Avatar for mrnutty
1
3K
Member Avatar for youLostTheGame

[QUOTE=youLostTheGame;] that's the code he gave me but i don't know how to apply it to my code. (will post below) [/QUOTE] So what's that code do? That the first thing to understand if you want to use it.

Member Avatar for arkoenig
0
140
Member Avatar for dnk

What if there are 2 or more spaces between some words? Did you count the first word? It has no space in front of it. Did you consider the way many people now incorrectly write? They never add a space after a sentence -- just run the 2 sentences together. …

Member Avatar for dnk
0
3K
Member Avatar for yongj

[QUOTE=yongj;]How can I make it from here so that it can list only the directory list that matches a specified file name pattern. So for example, how can I code it so that if I type myDir *.c it would list all files with an extension ".c" in that current …

Member Avatar for Ancient Dragon
0
159
Member Avatar for aprilchica3

[QUOTE=aprilchica3;] I think my problem lies in the capital function(). Only the first line capitalizes. I have gotten it t work in using cout, but it doesn't update the saved file. I am confused in using the ifstream & ofstream in the same file at the same time so maybe …

Member Avatar for aprilchica3
0
177
Member Avatar for charchar88

What are you doing with [iCODE]let_number = tolower(letter[i][j]) - 'a';[/iCODE]? Now, based on your description "it isn't reading correctly", do you think that's enough of a description for us to understand the problem? Please always give details so we can understand the problem. And where is the seg fault happening? …

Member Avatar for WaltP
0
149
Member Avatar for geekme

Probably differently than you did in your program. But since you didn't post any code, we can't tell what you did wrong.

Member Avatar for JasonHippy
0
779
Member Avatar for bigdan182
Member Avatar for abhimanipal
0
251
Member Avatar for dimmu1

You waited a whole 15 minutes? Come on, guy, some of us have lives and don't live on the board! As to your question, change the [B]deal[/B] function to return 1 and only 1 card. Then you can created a [B]dealHands[/B] function that will deal as many cards as you …

Member Avatar for WaltP
0
114
Member Avatar for cse.avinash

[QUOTE=cse.avinash;]yes a=0 is required in that for loop, since the loop has to be executed only once. I need help in reducing the code to 65 bytes, or if there is any other code. Please help me.[/QUOTE] Please stop begging. Posting to ask for help does not need a "[I]help …

Member Avatar for cse.avinash
-1
553
Member Avatar for jimJohnson

[QUOTE=jimJohnson;]I apologize that did not come out how it should have[/QUOTE] Is this supposed to mean something? My guess is your second command line parameter for the write file is bad. And it doesn't already exist since you are using the OPEN_EXISTING flag.

Member Avatar for jimJohnson
0
147
Member Avatar for alex1050

By reading the words on the background of the box you typed your post in. And all over the place CODE Tags are explained.

Member Avatar for CoilFyzx
0
882
Member Avatar for p.user01

[QUOTE=CoilFyzx;1543303]You see certain syntactical expressions have a [B]higher level of precedence than others[/B] By this I mean certain codes are "more important and so are executed first...for example ++ has a higher level of precedence that just + and brackets,namely () have an even higher order of precedence than ++ …

Member Avatar for WaltP
0
312
Member Avatar for TrustyTony
Member Avatar for king03

Are you using pencil and paper to "run" your program and see what happens? It's only 4 lines of code. Certainly you can follow that much just to see what the code does.

Member Avatar for Fbody
0
2K
Member Avatar for toferdagofer
Member Avatar for rena0514
Member Avatar for bonzo2008

[QUOTE=bonzo2008;1542430]Hi just wonder how I can use commandbutton ( caption Letter A) click event to read names from an random file that just corespond to letter A in to an listbox.[/QUOTE] In the click event 1) open the file 2) Start a loop, exit loop on EOF 3) Read a …

Member Avatar for WaltP
0
139
Member Avatar for mastertoilet

Neither do we. If it won't compile, it probably has errors. If it has errors, the compiler tells you what they are and where. Since we are not compilers, we need details.

Member Avatar for tomato.pgn
0
2K
Member Avatar for Skabix

You need to think about what you are doing and look carefully at the variables you are using. Are they the correct variables for each line?

Member Avatar for Skabix
0
1K
Member Avatar for boliviano3

Every time you enter any input, do you press the ENTER key? That key does go into the input buffer, ready for the next input. You need to clear it out.

Member Avatar for boliviano3
0
176
Member Avatar for cableguy31
Member Avatar for afnan92

Read the Member Rules and find out. You were asked to do so when you registered.

Member Avatar for WaltP
0
84
Member Avatar for MaAr91

No, don't convert to decimal. It's not necessary, and it's harder. You can convert directly into hex. Finish defining your [iCODE]char hexadecimal[17][/iCODE] array (and it only needs 16 values). Then start at the end of your binary and convert 4 'bits' into an integer. Use that integer to get the …

Member Avatar for WaltP
0
311
Member Avatar for lochnessmonster

Each compiler is written specifically for the OS it runs on. The [I]compiled[/I] program therefore runs only on the OS it was built on. [B]Standard C/C++[/B] relates to the source code. All compilers should accept any C/C++ code that was written to the C/C++ Standard and output a working program. …

Member Avatar for JasonHippy
0
497
Member Avatar for clickspiker23

Pass the midpoints in by reference. Load your values into them. They will be changed when you ret

Member Avatar for JasonHippy
0
140

The End.