2,867 Posted Topics

Member Avatar for kvprajapati

Why are you putting so much effort into shoehorning your code onto a dinosaur of a compiler? Yea, you may have "fixed" this issue but that's only one of hundreds of problems you'll encounter with a compiler that should have stopped being used 10 years ago. Let dead compilers lie …

Member Avatar for John A
0
167
Member Avatar for ankit894u
Member Avatar for ankit894u
0
117
Member Avatar for Valaraukar

Make a structure for your objects: [code]struct Object3D { int ***facets; float ***vertices; int *nFacets; int *nVertices; int numObjects; ... /* add all variables specific to your object here */ } [/code] Then, modify countObjects, loadShape and whatever other functions you need to take a [icode]struct Object3D*[/icode] as one of …

Member Avatar for Valaraukar
0
290
Member Avatar for jephthah

The only problem with explaining the usage of noparse tags is that it becomes somewhat cumbersome to explain the exact usage of the noparse tags themselves. For example, consider the following: [quote]Use noparse tags like this: [noparse][noparse] [code] code goes here [/code] [/noparse][/noparse][/quote] The above example was created by using …

Member Avatar for Ezzaral
0
293
Member Avatar for Ancient Dragon
Member Avatar for elliotcroft
Member Avatar for Lefkatis

Boot off your Windows install disk into the recovery console, then run [URL="http://pcsupport.about.com/od/termsf/p/fixmbr.htm"]fixmbr[/URL].

Member Avatar for Lefkatis
0
90
Member Avatar for ithelp
Member Avatar for mashimaro

Use [URL="http://opengroup.org/onlinepubs/007908775/xsh/popen.html"]pipes[/URL]. Even better, use the POSIX libraries to create your own ls() function: [url]http://opengroup.org/onlinepubs/007908799/xsh/opendir.html[/url] [url]http://opengroup.org/onlinepubs/007908775/xsh/readdir.html[/url]

Member Avatar for mashimaro
0
183
Member Avatar for soysauce339

Well... does your Mac detect it? Try using Disk Utility to check if your Mac recognizes the second hard drive. [LIST=1] [*]Plug your external hard drive into your PowerBook. [*]Disk Utility is in the Utilities folder, which is located within your Applications folder. Start it up. [*]Look in the left …

Member Avatar for johnlh
0
296
Member Avatar for jpawlic

HFS+ is a filesystem that's designed so that it shouldn't need to defragged. However, if you really need it (normal usage won't need it), iDefrag is available, although it's not free. And of course, the best way to clean up a filesystem is to wipe it and start from scratch. …

Member Avatar for johnlh
0
141
Member Avatar for kestered

You can either compress them with a non-lossy method (for example, putting all your photos into a zip archive), or a lossy method (scaling them so the pictures themselves are actually smaller, or saving them at a lower quality).

Member Avatar for johnlh
0
85
Member Avatar for brechtjah
Member Avatar for jbennet
0
161
Member Avatar for ha_rini
Member Avatar for Aia

>For that reason, the window shows once per visit to DaniWeb. Determining a 'visit' upon the referring URL is incredibly annoying. Not everyone enables referring URLs, and people often go directly to certain pages without clicking a link (bookmarks, for example), or edit URLs before they go to them (eg. …

Member Avatar for martin5211
0
315
Member Avatar for Nick Evan

I'm primarily [URL="http://redwing.hutman.net/~mreed/warriorshtm/archivist.htm"]archivist[/URL]. I do however enjoy being a [URL="http://redwing.hutman.net/~mreed/warriorshtm/jerk.htm"]jerk[/URL], and a [URL="http://redwing.hutman.net/~mreed/warriorshtm/nanny.htm"]nanny[/URL]. >Gah, I was hoping for a quiz to do it for me; According to [url]http://www.quizilla.com/quizzes/1000935/which-flame-warrior-are-you[/url] I'm a Kung-Fu master, although I've engaged in far too many battles and made enough blunders that I don't qualify for that …

Member Avatar for Narue
0
320
Member Avatar for death_oclock

The real reason you're having problems with your code is you're trying to modify a string literal: >printf("ID: %d\n", getCommandId("move")); You never allocated space for "move", so who knows what strtok() and your strToUpper() function are trying to do with your computer's memory.

Member Avatar for death_oclock
0
194
Member Avatar for cjswanson1355
Member Avatar for meghs007

C(n,r) can be calculated as follows: [tex]C(n,r) = \frac{n!}{(n-r)!r!}[/tex] Which means your horizontal component would be 'r', and your vertical component 'n'.

Member Avatar for John A
0
54
Member Avatar for AdamMagana

printf takes a formatting string as its first parameter. You probably meant: [code]printf( "%d\n", bytes_received );[/code]

Member Avatar for AdamMagana
0
147
Member Avatar for tabooxchanz

jepthah is right, there's far too much proprietary code for anyone here to help you. Not to mention fflush(stdin), and fixing your program so you don't require that could take quite some time. I will point out a fairly simple thing you can do to improve your program however, change …

Member Avatar for tabooxchanz
0
186
Member Avatar for lio04

My guess would be a framebuffer issue. Are you using one right now (eg. is your console text smaller than, say, the text from your BIOS), and if so, what are the settings for it? You can check these in your bootloader, usually /boot/grub/menu.lst, or /etc/lilo.conf if you're using lilo.

Member Avatar for lio04
0
129
Member Avatar for aiosarem

That's pretty simple. Include the <ctime> header, then use the function [URL="http://www.cplusplus.com/reference/clibrary/ctime/localtime/"]localtime[/URL]. That does the converting process from time_t to a tm structure, and from there you can extract the data into your objects. If you need to go the other way (tm to time_t), you can use the [URL="http://www.cplusplus.com/reference/clibrary/ctime/mktime/"]mktime[/URL] …

Member Avatar for ArkM
0
4K
Member Avatar for sivak

>as for the EOF macro, it's not standardized. Actually it is. >It can have different values depending on compiler. That's why it's a macro. If fgetc encounters the end of the file, it will return the value represented by EOF. >It can also be a catchall for various error codes. …

Member Avatar for Aia
0
399
Member Avatar for Waffles_2411

How about [code]void analyze( struct Crypt key[] ) { ... }[/code] Although not required, you should pass the size of the array, too: [code]void analyze ( struct Crypt key[], int size )[/code] This way the function works with different array sizes.

Member Avatar for jephthah
0
166
Member Avatar for kyosuke0

Make a function that takes 2 integers as parameters, and returns an integer. You can print the result in hexadecimal form with the std::hex mode: [code] num = ANDoperation(0x0011, 0x0101); std::cout << "0x" << std::hex << num;[/code]

Member Avatar for John A
0
105
Member Avatar for MosaicFuneral

We don't even have a code tag checker (which would be relatively straightforward to implement). What makes you think we'll invent a literacy checker any time soon?

Member Avatar for MidiMagic
0
256
Member Avatar for want_to_code

>Prototypes don't go inside other functions. Wrong. Prototypes don't [I]usually[/I] go inside other functions.

Member Avatar for Aia
0
174
Member Avatar for jbennet

>With certification you will stand out in the crowd of other graduates... I doubt it.

Member Avatar for Janepenelope
0
157
Member Avatar for Aelphaeis

>however do you think would work if I did something crazy like >char string [] = getstring(15); No, you can't initialize an array with a memory address. That's what pointers are for.

Member Avatar for jephthah
0
91
Member Avatar for k2k

Try [icode]java HelloWorld[/icode]. The .class file is the actual bytecode which java executes, but the java program requires you give the filename without the extension.

Member Avatar for k2k
0
132
Member Avatar for tubbybubby

It sounds like you aren't dealing with all levels of permissions. In UNIX operating systems, there are three levels: - owner permissions - group permissions - everyone permissions My guess is that you only adjusted 'owner' permissions, which doesn't mean squat if you left full permissions for everyone else (which …

Member Avatar for open2discussion
0
107
Member Avatar for Aelphaeis

>sure you can write a program with conio.h, but it will be broken on most every >non-microsoft systems. And you can write a termios.h solution that will be broken on every non-POSIX system. What's your point? You can't portably change the shell's input mode without the use of a third …

Member Avatar for Aelphaeis
0
400
Member Avatar for veledrom
Member Avatar for Narue

>For some reason Mod's refuse to use [noparse][quote][/quote][/noparse] tags I use them less frequently than other people because [quote] tags are terribly bulky for quoting 1-2 lines. Plus, consider that a lot of us here have a history of using newsgroups and mailing lists, where '>' is the only accepted …

Member Avatar for WaltP
0
349
Member Avatar for hoony11

So the fact that it wasn't even installable without hacking the .msi doesn't hint that maybe it's not supported on Windows 7 yet? Windows 7 is still a beta, don't expect too much from it.

Member Avatar for shniager
0
114
Member Avatar for amit_ciem
Member Avatar for pdrino

>Technically speaking, I initialize and reinitiaize str pointer with every word I read from file. You clearly don't understand how memory works in C. Either you use static memory, in which case the compiler takes care of allocation and deallocation, or [B]you[/B] have to take care of it yourself (dynamic …

Member Avatar for Aia
1
2K
Member Avatar for Zcool31
Member Avatar for joozi

[quote][code]int number; inFile >> number; while(!inFile.eof()) { inFile >> number; [/code][/quote] You're overwriting the first number in the file. You haven't counted whether the first line in the file is the number that the user entered. That's why your program only reported 3 occurrences of 64. Your second problem is …

Member Avatar for WaltP
0
103
Member Avatar for originalremix

There's much easier ways to accomplish what you're trying to do. Try using python's built-in string module. [code] if type(x) == str: if x.isupper(): # character is uppercase elif x.islower(): # character is lowercase else: # this is not a string[/code]

Member Avatar for woooee
0
172
Member Avatar for MaestroRage

This doesn't have anything to do with C, but your shell. For example: [code]$ some_program < input_file[/code] When some_program reads from stdin, it will be reading the contents of input_file.

Member Avatar for Aia
0
13K
Member Avatar for MaestroRage

I have no idea what you mean by 'classes' (are you really programming in C?), but in general you should put structures and function prototypes in your headers, then [ICODE]#include[/ICODE] them into whatever headers or source files you need them in.

Member Avatar for Ancient Dragon
0
9K
Member Avatar for Samran

You've got smart quotes [icode]“[/icode] instead of straight quotes [icode]"[/icode]. Did you write that code in a word processor?

Member Avatar for Samran
0
165
Member Avatar for bobrien314

Try converting the string to a long int first with strtol(): [icode]val = strtol( argv[1], NULL, 10 );[/icode] It's also a good idea to set [icode]errno=0[/icode] before calling the function; you can then check it afterward for errors (return value isn't reliable since 0 can be a valid result).

Member Avatar for bobrien314
0
85
Member Avatar for Samran
Member Avatar for John A
0
123
Member Avatar for markfisher

>since I'm zeroing 2 -> 8 bytes and rest I'm not zeroing, why my buffer is all zero? It's not. It only zeroes out 8 bytes at a time. You probably assumed the entire string was zeroed when you tried to print it, since a 0 (or null character) indicates …

Member Avatar for markfisher
0
119
Member Avatar for Dani

I second Ezzaral for the forum tools menu. It's more convenient than navigating back to the forum index.

Member Avatar for John A
1
139
Member Avatar for wasge

What are you trying to do? Variable names are largely irrelevant; they're just a means of accessing memory in your system. Learn about pointers and you'll understand how this works.

Member Avatar for wasge
0
229
Member Avatar for meghs007

Well, let's say you've declared a 2D matrix as the following: [icode]int matrix[n][n];[/icode] How would you write numbers around the border? [code] 1 2 3 4 5 16 6 15 7 14 8 13 12 11 10 9 [/code] Now think of a circular matrix as a set of these …

Member Avatar for John A
1
83

The End.