949 Posted Topics

Member Avatar for raj REDDY

You have a stop variable. Every number that is single, is given a "stop" equal to, the first number read, meaning no other numbers will be printed beyond the first one. Otherwise, stop is given the value of the number after the hyphen (the second number). So I picture this …

Member Avatar for raj REDDY
0
201
Member Avatar for prakhs

You have two constraints and one goal. The goal is ez - maximum volume of the box. (length x width x height) The two constraints are: 1) The length of wire to make around the edges of the box (there are 4 horizontal edges on the bottom square of the …

Member Avatar for Adak
0
186
Member Avatar for fsdhf_20

I'm no math whiz, but don't you have to find the range of possible answers for a,b,c,d, separately, in every equation, and then look at the range where all 4 variable's ranges, overlap? Emphasis on the highest and lowest values for each variable, of course. Everything in between should be …

Member Avatar for CrazyDieter
0
167
Member Avatar for mattboy64

When you finish moving menu() and etc., outside of the other functions, then post your new code up, if it still has problems. That way we'll be able to see the new code, and be on the same pew.

Member Avatar for Adak
0
222
Member Avatar for mattboy64

scanf() requires the address of the variable it will change. printf() does not. & is the address of operator.

Member Avatar for Tumlee
0
184
Member Avatar for mattboy64

main() is always the first function the program will execute - regardless of what order your functions are listed in. (At least, of the functions you can see. There are other functions that boot the program and prepare it's execution, but you never see them) You MUST have a main() …

Member Avatar for deceptikon
0
257
Member Avatar for kw42chan

In C, a semi-colon marks the end of an expression. On these and other expressions, your semi-colon has cut them off - and you need to remove them. for ( i=0 ; i<=8 ; i++ )**;** { for (j=i+1;j<=9;j++)**;** { int temp; if(array[i]>array[j])**;** {

Member Avatar for kw42chan
0
268
Member Avatar for LDaneil

I'd write a very short utility to get further info from the data, first. I'd want to know how good the hashtags are for differentiating one user from the other. Specifically, what percent of a large sampling (all 6 million), are unique? (100% - repeat%). I'm not a Twitter user, …

Member Avatar for Adak
0
970
Member Avatar for BHARGAVI2

It's more difficult than that. There are lots of different image formats, and every one of them has strictly different requirements. Google for an image library for the language of your choice. Several are free. We don't take code requests - we help YOU with YOUR code that you bring.

Member Avatar for Ene Uran
0
149
Member Avatar for tadas.bareikis

One = is for assignment ONLY. Two ='s are needed for comparison: c==0. Since this is already true, the loop never starts. Use for(i=0;i<10;i++) printf("%d\n",i); a is zero, so adding it to i will make no difference.

Member Avatar for deceptikon
0
112
Member Avatar for Landoro

It's best to state your question in a new thread for two reasons: 1) it's not the same as the original problem, and 2) it may not get the attention it deserves, here. You can't use an array to hold the numbers? What CAN you use? No sense speculating about …

Member Avatar for Adak
0
200
Member Avatar for you207

Why are you including the header file "stdafx.h"? I'm not familiar with this in C. What about "stddef.h". Why do you need this? Why are you writing out your words in binary mode, into the file, but reading in file data in text mode? (line 62 and 77) To debug …

Member Avatar for deceptikon
0
2K
Member Avatar for revelator

Well, void main() should be int main(void), with a return 0 at the end of it (in main). Having all your code in main() is awkward, you should break it up into fucntions. Usually, every option in the switch statement, gets a new function. And then you need a big …

Member Avatar for Miorfs
0
4K
Member Avatar for OTayeby

Two ways come to mind: 1) use fscanf(). It naturally breaks with spaces, so if your record fields have just a single word in them, followed by a comma and a space before the next field, it's good. The comma will have to be removed from the last char of …

Member Avatar for Adak
0
249
Member Avatar for gunvinayaka

If a number can't be repeated, then it's not random or pseudo random - just to be clear. If a number can't be repeated, even during several runs of the program, then clearly you need a data file to be read to tell the program what numbers either can or …

Member Avatar for deceptikon
0
402
Member Avatar for anestistsoukalis

Sure, but that won't help you. How would YOU solve this - forget the computer for now. Solve it by pen and paper a few times, very slowly. How did you do that? Write down the steps you took to solve it, and use small steps. BECOME the tip of …

Member Avatar for Adak
0
104
Member Avatar for Cw Will

Yes, you can. I have barely worked with this, years ago, but IIRC it was done like this: 1) print the letters out, as per regular 2) Technique #1: a) use ascii char like 176,177 and 178 (â–‘, â–’, â–“)to "dim" the letters, when you print over them. Then immediately …

Member Avatar for Adak
0
281
Member Avatar for vebi1000

Dean, he's posted this thread on at least 3 programming boards, and received code and the most detailed software and hardware discussion on another board. He's had at least 4 algorithms and several snippets of code given to him, already. He wants code - and he's been given code, but …

Member Avatar for vebi1000
0
198
Member Avatar for collin_ola

void functions like eReturn, don't return anything, so putting the word "return" in there, is completely superflous. And you can only return one item from a function. If you need more, I'd send it to the function as a pointer in the parameter. Say I want to return i and …

Member Avatar for Miorfs
0
3K
Member Avatar for saurabh.mehta.33234
Member Avatar for rajilakshmi

It's not hard once you understand the problem. Work it through several times yourself, by hand. Notice particularly HOW you are using logical patterns to solve it. Repeat until you understand those patterns - and that will form the skeleton of your algorithm for the program. BUT - it's up …

Member Avatar for Adak
0
168
Member Avatar for noahjonesnoah

There may be a slick way to do this - sorta has that "smell" to it, but I don't know it. Right now, I'd make a struct or use parallel arrays to sort the inputs by a and b (both). That will give you all matches of a and b …

Member Avatar for Adak
0
138
Member Avatar for chandnigandhi

You have a good compiler for this, because Turbo C has several extensions for working with text on the console window. When I did this, I used a simple, oversized char array which was not the best design certainly, but it worked, and I was not interested in making a …

Member Avatar for deceptikon
0
153
Member Avatar for miracle Kimuli

It's an old school type solution, but I used three int arrays. One for each of the two numbers' digits to go into, and one to hold the "carry" value. Imagine they are stacked up on top of each other. One digit ONLY per element of each array. Any value …

Member Avatar for Adak
0
171
Member Avatar for ashrafbd

In your binary search, the logic is wrong. If the word being compared is < target word (has a negative number returned from strcmp()), then you need to have the high brought down mid-1 And if the word being compared is > the target word, you need to have the …

Member Avatar for Adak
0
135
Member Avatar for celina1234
Member Avatar for Ancient Dragon
0
185
Member Avatar for chipbu

Different compilers, and OS's, have different sized buffers for handling this - and indeed, whether the buffer is used or not. Linux, being based around Unix, has a larger buffer, I would hazard a guess at. Windows, being based around PC's with more modest resources, typically uses a smaller buffer. …

Member Avatar for Adak
0
282
Member Avatar for celina1234

Celina, can you write out in plain English, a description of what you want, step by step: 1) get input - this is an example: "example of input here" 2) process or calculate some here 3) give output like this, to a file with a numbered name, every 5 minutes …

Member Avatar for Adak
0
304
Member Avatar for syeda amna

DVD drive and fan control depends on the system and mobo/DVD drive, as well as your operating system. This is not like DOS where you can control everything you want, from your program. THAT was WAY too hacker/virus/malware friendly. Nowadays, anything you want to do like this, you do it …

Member Avatar for BobS0327
0
4K
Member Avatar for Jenniferting

If you don't know C's most basic operations, one questions what you're doing working with credit card validation algorithms or code. Hmmmmm.

Member Avatar for pritaeas
0
673
Member Avatar for prakhs

You're cluttering up your code in the while loop. Set an input function up, and just call it. Either sort the input there as well, or set a sort function up, as well. Kudo's for using a Shell sort - modern cpu's have really raised it's stock options, and your …

Member Avatar for prakhs
0
164
Member Avatar for hust921

Try this. (It works, but you'll need to adapt it a bit). I changed d to divv, and c to cur. You need to include <math.h> for sqrt() (big time saver). Be sure to initialize biggest to zero, before the loops start. //two is handled separately, before this for (divv …

Member Avatar for Adak
0
162
Member Avatar for Fuzzies

Line 14 is an example of your problem, for all your for loops: for ( i = 1; i <= NUM_VALUES; i++ ) Which is wrong. correct is: for ( i = 0; i < NUM_VALUES; i++ ) You need to MEMORIZE this idiom! This is C, and C has …

Member Avatar for Fuzzies
0
273
Member Avatar for Priya.87

The heart of games is usually a BIG do while or while loop. You probably will want to call other functions, but they always return to the BIG game loop. So start with a BIG game loop, and see how far you can go. When/if you get stuck, post your …

Member Avatar for Adak
-2
111
Member Avatar for DarkPyros

You can't use [i] as your index in vowstr[]. i is tied to the entire string that was entered. BTW, you could have done all this in a single for loop. ;) Add int m=0, and then use vowstr[m++] instead of vowstr[i], in the if statement

Member Avatar for Adak
0
120
Member Avatar for ThatJamaican

Line 21, add a space before the %c: scanf(" %c",&wordlength). That is needed to "eat" the newline that was left over in the input buffer, from when you hit enter.

Member Avatar for Gonbe
0
263
Member Avatar for arlir

You've done a LOT of work here! :) I couldn't even locate your code for deleting a record, however. There's no need to actually delete every record you want removed - sounds odd, but if you edit their name and make it "", you can then add a small bit …

Member Avatar for Adak
0
158
Member Avatar for nitin1

You can simply download an ASCII table - I got mine from lookuptables.com I believe. google it and you'll see a lot to choose from. Get one that includes their hex value. I keep it as a gif on the desktop - very handy. 30h is not a binary value, …

Member Avatar for nitin1
0
540
Member Avatar for Jenniferting

Show your current output, and also an example of what you want. Looking at your code, I can't see what your description is describing. I'm in a mash up here. ;) BE SURE TO USE CODE TAGS around these examples, so the forum software won't mangle the spacing of them!

Member Avatar for Jenniferting
0
229
Member Avatar for ali11

Your prototype for getdate is this: void get_date(int holder, int day, int month, int year); But the function itself, says: void get_date(int holder, int *day, int *month, int *year); Which has the compiler giving errors to you. Make your prototype the same as your function's first line, and you'll be …

Member Avatar for Adak
0
137
Member Avatar for prathiyus

1) You have to get the format of the pixel, in that type of picture - and there are many types of greyscale. You can google the format. 2) Make the number of variables (and type - probably unsigned char, but it could be int), you need, to correspond to …

Member Avatar for Adak
0
113
Member Avatar for Icekilla

You could extend your current program by changing int q to unsigned long (or unsigned long long if your compiler supports it). The goal of course, is that you will have to work out a way to multiply using int arrays, however. (you could use char arrays for the digits, …

Member Avatar for Adak
0
176
Member Avatar for kidpro

Move line 6 to line 4, so your variables are being created just once, outside the loop, (we're big on recycling, hey!) <smile> Instead of a getch(), make it a scanf() for the value of again, and do it like this (NOTE THE SPACE BEFORE THE % !) printf("Add another …

Member Avatar for Adak
0
130
Member Avatar for prathiyus

I doubt if anyone here knows what the specs are for VB graphics to emulate it precisely. Google "graphic libraries for C", and you should come up with something - there are several - some simple, some for only certain operating systems, etc.

Member Avatar for Adak
0
79
Member Avatar for joao.jose.520

You can save it any way you like. In Sudoku, we save the grid as an 81 char string, with no line breaks. It's hard to understand it from looking at it outside the game configuration, but it allows us to save a TON of still readable grids, in a …

Member Avatar for Adak
0
233
Member Avatar for sunygirl92

First thing is to be able to read the data in the file. To do that, you need to know the way the data is organized, in the file. Run through a C tutorial on opening files, and reading from them, into an array of some kind - the kind …

Member Avatar for Adak
0
155
Member Avatar for leesin

The first thing you need to know, is what format the data in the file, will be in. The more variety this is to the format, the more logic you will need to have, since every possible format that is found in the data file, must be handled appropriately. So, …

Member Avatar for leesin
0
97
Member Avatar for prathiyus

Your sort is a substitution sort (very similar to a bubble sort), and your outer for loop should stop at i < n-1, instead of i < n. Because j is i+1, on the last loop.

Member Avatar for prathiyus
0
338
Member Avatar for jcmoney1010

On line 62 and 64, you are returning prematurely - after the first name search fails. You need to put those returns at the very bottom of the function. To return more data from the function you need to send in another parameter, a pointer, so the variable it holds …

Member Avatar for dmanw100
0
113
Member Avatar for dancks

It's OK to be somewhat stubborn, but when you're wrong, is not the time. Of course, they're built to different standards, they're years apart, and from different lineages, as well. Don't be that silly student who uses a different compiler than his teacher, because he "has preferences". ?? This is …

Member Avatar for dancks
0
202

The End.