jephthah 1,888 Posting Maven

you're trying to return an int ** , and your assignments expect the same.

but your function return type is int

jephthah 1,888 Posting Maven

yeah. okay. sure.

:icon_rolleyes:

jephthah 1,888 Posting Maven

have you looked? open the performance monitor and watch the memory usage while you run the program. does it increase continuously?

do you have calls to malloc, calloc, or realloc?

if so, do you "free" the memory allocated?

jephthah 1,888 Posting Maven

most people around here haven't used <graphics.h> for about 15 years. it's way obsolete now.

so, sorry, you probably won't get much help.

you should ask your instructor why he doesnt teach you how to use a modern graphics libraray, like GTK or OpenGL.

jephthah 1,888 Posting Maven

good plan, going back to college. good plan being on a technical track. i think you'll do well. :)

jephthah 1,888 Posting Maven

sounds like you'll do just fine here, welcome! :)

jephthah 1,888 Posting Maven

gotta start sometime! welcome :)

jephthah 1,888 Posting Maven

greetings, and welcome!

homey don't blog, so i won't be much help, but im sure you'll find a lot going on in the Web Dev forums.

.

jephthah 1,888 Posting Maven

counting down... only 35 to go. reserve your place now.

jephthah 1,888 Posting Maven

well, was that it, did you find a leak?

jephthah 1,888 Posting Maven

you could have your master broadcast a UDP packet that the clients will be looking for and that can start what ever you want them to do.

but yes, you will have to assume the clients have some amount of preconfiguration already done, and a process running that looks for network activity.

jephthah 1,888 Posting Maven

globals are widely considered poor programming. you should learn to not use them, by not using them unless you have a condition where it's necessary to do so.

You think "it works" for you now, but it's a Faustian bargain. And it will come back to haunt you.


.

jephthah 1,888 Posting Maven

Something I've never understood. If you have something wrong with you, US films/tv show a demand for a credit card when the hapless individual is rushed into ER.

What happens if somebody is rushed into ER, is treated for something really serious (e.g. heart attack), but it is then found that they do not have medical insurance? Do they then get fleeced by sharks and are forced to sell all their worldly goods or are they simply thrown out on the sidewalk?

OR, if they are treated anyway, why bother with medical insurance?

Totally perplexed.

no, they just get your ID info and do the insurance paperwork later. if you dont have insurance you get billed. if you don't pay your bill, it just sits on your credit record and negatively impacts your ability to get unsecured loans. if you don't pay bills, then generally you probably dont care about your credit record anyhow.


non-private hospitals and regional trauma centers become the primary care for people with no insurance, becasue they do not turn away patients who need medical care. since these millions of people without insurance are clogging up the trauma center ERs, they drive up costs for everyone else, and consume resources of ER centers that cost probably 4-10 times more than a primary care provider.

it makes no sense to continue such a system. if people can get primary care at a regular provider and deal with health maintenance in a reasonable way …

jephthah 1,888 Posting Maven

Bork Bork Bork!

Wilkommen!

jephthah 1,888 Posting Maven

Jesus Saves, but Julio Invests in Mutual Funds.

jephthah 1,888 Posting Maven

okay, if you're on windows, get the old DOS library <conio.h> ... if you're on *nix, get the posix terminal library <termio.h>

it's not standard c, and it's not portable, but it will do what you want. there's plenty of examples on the interwebs.

jephthah 1,888 Posting Maven

please just one more time help me

naw... you'll be back :)

jephthah 1,888 Posting Maven

If waiting tables is truly slave labour, shouldn't you ... demand a decent (minimum?) wage. ... tipping could then be abolished. ... in the UK/other parts of Europe ...

Wut? The hell you say, this is AMURRICA!

You don like it you can go on an GIT OUT!


.

jephthah 1,888 Posting Maven

because now it's a pointer so you need to dereference it when you want to make an assignment to it. line 3 becomes:

if(( *TempFile = fopen(FileName, Mode) ) == NULL)
jephthah 1,888 Posting Maven

looks like you didnt bother to read the rules.

it's only stuck right at at the top of the forum, and titled

Read This Before Posting

take some time to do so now.

jephthah 1,888 Posting Maven

FILE * is a pointer. if you want to pass it by reference, make it a pointer to a pointer, FILE **

jephthah 1,888 Posting Maven

wow... self-righteous much? :icon_rolleyes:

speaking of "Leaders" and being incapable of "independent thought" do you get your rants from Glenn Beck or Rush Limbaugh, or do you just synthesize Fox News talking points in general?

jephthah 1,888 Posting Maven

you'd have to get rid of the "type ahead input" from your terminal, which is controlled by the operating system.

the answer on how to do that in standard C, is you can't. there are some old DOS libraries out there that can, and there's a POSIX library for Unix, but it's dependent upon finagling with the operating system, and it's not standard C.

here in the 21st century, entering and hiding passwords is handled in GUI applications via callbacks.

jephthah 1,888 Posting Maven

8-bit ASCII characters include a lot of non-printable and extended characters that are difficult to transmit properly between certain applications.

"Base64" is just a conversion method that changes a string of ASCII (printable and unprintable) codes into 64 different "clean" (printable) characters... (Note: since ASCII value range from 0-255, in this context it could be considered as "Base256".)

to reduce an ASCII string down to 64 printable characters, a string of 8-bit ASCII characters are converted to a string of 6-bit Base64 characters. the 64 characters used are typically [A-Za-z+/].

every three (3) 8-bit ASCII characters convert to four (4) 6-bit Base64 characters (3 chars x 8 bits = 4 chars x 6 bits). to ensure the converted string length is a multiple of 4 characters, one or two equal signs '=' may be used to pad the end of the last quartet if needed.

the "encryption" you're thinking about is that OpenPGP encryption uses a form of Base64 for transmission called "Radix-64" -- also commonly referred to as "ASCII-armored" text -- which includes a CRC checksum to ensure transmission didnt mangle any data.

But Base64 is not an encryption, any more than ASCII codes are "encrypted". It's just a conversion used as part of the transmission protocol for applications including some encryption processes.

.

jephthah 1,888 Posting Maven
jephthah 1,888 Posting Maven

when you declare a prototype, like in line 4, you declare the function type, function name, and argument types, like you did: void printtable(int x); , this must match the definition of the function, which you have down on line 46.

but when you *call* the function in the program, like at line 9, do not include the function type or argument types, so you just call it like so: printtable(10); .... where the number "10" (for example) could be any "int" value and will be passed to the function.

when you get to the function definition, starting at line 46:

void printtable(int x)          /* Function definition */
{
    for (x=0; x<10; x++) 
    {
        printf("%d",x);
        printf("n");
    }
}

you see that whatever value passed in from the function call (line 9) will come into this function via the argument as "int x"... the purpose of this would be to have a value that could then be used for whatever purpose you intended within the function.

HOWEVER, what you are doing is not really correct, or at least is not what is intended. once you get to the function, you reassign "x=0" in your FOR loop, thereby losing whatever value was passed in.

it seems to me that you really intend to have "x" be the upper limit of your for loop, so that it counts out "x" numbers. change your printtable function to something like this:

void printtable(int x)          /* Function definition */
{ …
jephthah 1,888 Posting Maven

I'm not convinced that's correct. i'm not even convinced the indentions that have appeared since Walt added the code-tags are correct. they're pretty much a mess too.

i'm half suspecting the print() and printtable() are really the same function that was just misnamed in one spot.

we won't really know anything until the OP returns to clean up his code.

jephthah 1,888 Posting Maven

Cowboys < Steelers

jephthah 1,888 Posting Maven

ah, grown men loitering on playgrounds late at night.

well... I guess that's okay then.

oh wait, no it's not.

jephthah 1,888 Posting Maven

i think the going rate for homework dumps is $1000.00 USD, paypal verified.

jephthah 1,888 Posting Maven

Hi and welcome!

the Python forums are fairly popular here. I dont know anything about semantic technology. best if you popped in over there and gave them a holler, i'm sure they'll help you as they can :)

jephthah 1,888 Posting Maven

Hello and welcome, Bob Plunkett :)

I was born in Okinawa. Aza-Kuwae Chatan-Son, if i correctly recall what's written on my birth certificate. I often wonder about my birthplace, i was only 3 mos old when my folks brought me back to the States. (my dad was USAF). he was there for a year and has good memories of the island, the people and scuba diving.

what do you like to look at with your telescope?

jephthah 1,888 Posting Maven

welcome! and welcome back! :)

jephthah 1,888 Posting Maven

closer to Mukilteo, or closer to Coupeville?

jephthah 1,888 Posting Maven

welcome, Ashwell! :)

jephthah 1,888 Posting Maven

And if the dam breaks open many years too soon
And if there is no room upon the hill
And if your head explodes with dark forebodings too
I'll see you on the dark side of the moon.

oh, and welcome.

:)

jephthah 1,888 Posting Maven

yeah... but do you notice a similarity between this thread and another thread in Geeks Lounge?

jephthah 1,888 Posting Maven

I too am having a hard time understanding what you're asking.

are you saying that you want the lines to be printed "n" number of characters wide, such that extra spaces are inserted between words in order that both the left- and right-hand sides are justified margins?

Example:
n=12
Sentence = "Now is the time for all good men to come to the aid of their country."

Result:

Now  is  the
time for all
good  men to
come  to the
aid of their
country.

is that what you're asking?

jephthah 1,888 Posting Maven

what is the value of BUFFER, that determines how many characters fgets pulls in at a time ?

the target string could be hitting the fgets boundary right where the searched pattern is occuring.

it might seem unlikely, but the fewer number of characters in the string being read by"fgets" at one time, the higher chance that this can occur.


.

jephthah 1,888 Posting Maven

I fixed that, and it didn't work either, i still had the problem, when i tested it on UNIX it worked fine, so yes the problem i believe is my Mac

hmm.

now that's a head scratcher.

okay, i'm going to leave this alone.

jephthah 1,888 Posting Maven

is that sort of a left-handed compliment?

Schildt is smarter than me too, but he's been criticized relentlessly by a number of people on the ISO standardizing committee. They seem to particularly revile his Annotated C Standard but also are quick to disdain his C: A complete Reference

I have C:ARM somewhere. i never had any problem with it as a generic learning guide/reference, other than it was a bit simplistic and sparse.

jephthah 1,888 Posting Maven

no, the problem is not your Mac.

The fact that it happens to work on some environments (your Unix) but not others (your Mmac) doesn't mean that Mac is the problem. Mac is working correctly. your CODE is wrong.

as what thomas noticed, above, your array sizes are not defined correctly.

char letters[[B]6[/B]];
int mem[[B]3[/B]];

must be changed to

char letters[[B]7[/B]];
int mem[[B]4[/B]];

if you leave it the other way, even if it happens to work on some particular platform, the code is still wrong.

jephthah 1,888 Posting Maven

I was always brought up that cow tipping was a standard rural recreation event. So it was surprising when my mom argued with me today that it is now considered rude to suggest that provincials will engage in an evening of cow tipping. I have nothing against cow tipping, but to me it seems a bit unpleasant for the cow and possibly dangerous. Since cow tipping is apparently so widespread I don't see any logic behind this supposed change in attitudes about it. Being an urbanite I might be out of the loop. Maybe it's just a hoax. Thoughts?

jephthah 1,888 Posting Maven

remove <iostream>
remove <cstdlib> ... replace with <stdlib.h>
remove "using namespace"

calling a function "print" is bad practice.

void print(int x)
should not also have a local redeclaration of "int x" choose either one or the other. what is this doing, anyhow? printing 1-10? why do you need a dedicated function to do that?


good lord this is a mess.

where does your main() routine even end? where do your function definitions begin? are your functions "printtable" and "print" the same functions?

clean up this mess of code and repost it using proper indentations and code tags, so we can see what the heck is going on.

this is unreadable.

jephthah 1,888 Posting Maven

EDIT : oops, i didnt realize this this thread was 5 days old.

nothing wrong with 70%.... heavy reads in a while loop,that would be expected. if other programs need (or are already using) cpu resources while this program is running, they will share the available resources.

and yes, get rid of the bzero. it's unnecessary. the fgets will null terminate the buffer after each read.


.

jephthah 1,888 Posting Maven

Why these lines?

#include <iostream>
using namespace std;

because he thinks this is the C++ forum.

jephthah 1,888 Posting Maven

yeah, well you little punks need get your ass inside at night and do your homework.

Ezzaral commented: :D +0
jephthah 1,888 Posting Maven

i'm afraid that if the Birchers and Teabaggers find out i'm a card-carrying pinko batshit liberal pantywaist, they will stop giving me positive rep in the C forums.


.

jephthah 1,888 Posting Maven

20% is easy too. just calc 10%, and double it

;)

jephthah 1,888 Posting Maven

yeah, i understand the problem of the retirees with fixed income and medical bills. so i always cheerfully waited on them just the same, expecting to get a small tip, and would be graceful to receive it because i figured they were doing what they could.

but there are some older folks who just have this attitude that tipping is some sort of communist plot or something, and they just flatly refuse to tip.

either way, the probability is against the server when waiting on older folks. it's just the way it is. i'm glad you're able and willing to tip appropriately as the service deserves it.

DISCLAIMER: i'm not ever suggesting that anyone should reward truly bad service, or give a full tip for subpar service. but do consider that sometimes things are out of the server's control, and it's not an easy job.