1,265 Posted Topics
Re: or try [code=perl]$dir = "x:\\share1\\share2"; if (-d $dir); { print $dir," exists\n"; } else { print $dir," not found\n"; }[/code] . | |
Re: i haven't tested it, but it looks right. so, what's your question? didnt the site you downloaded the programs from give you some instructions? | |
Re: just to start, i notice a couple things: [code]warning: return type of ‘main’ is not ‘int’[/code] "void main" is wrong. don't do it. [code]warning: the `gets' function is dangerous and should not be used.[/code] NEVER EVER USE GETS. ever. fix those things and we can move along. | |
Re: theres no standard way to do this. it totally depends on your environment. for instance, a POSIX solution might look like this [code]#include <stdio.h> #include <dirent.h> int main (void) { DIR *dir_ptr; struct dirent *entry_ptr; if (dir_ptr = opendir ("./")) { while (entry_ptr = readdir (dir_ptr)) printf("%s\n",entry_ptr->d_name); closedir (dir_ptr); } … | |
Re: [QUOTE=ssDimensionss;854810] I know how to isolate the 16bits on the 32bit instruction, by shitfting it 16bits left the shifting it 16bits right again. [/quote] that's not how you do it. AND it with a bitmask [icode] 0x00FF[/icode] to get the lower 16 bits out of the instruction and copied into … | |
Re: (1) this is C. not C++. check the forum and post appropriately. (2) your code snippet doesn't even remotely begin to answer the question. obviously you didn't read the forum, but did you even read his question? did you even read the title of the thread? (3) generally speaking we … | |
Re: Kudos to using code tags correctly for your first post! :) but i dont understand the goal, here.... i see that you read player's names ... but where's the "random matchup" of teams come into play, and what's that got to do with the players? | |
Re: [QUOTE=ks7_666;853489]i figured how 2 solve q4 now but i tried 2 solve 1,2,3 i cant do anything .[/QUOTE] bull crap. you did [B]not[/B] just spontaneously "figure out" how to write the code for Q4, and yet still remain completely helpless to even begin Q1 - Q3. because Q4 combines all … | |
Re: [QUOTE]Ok i got 3 errors now, and im using Boreland C++. Teacher made me declare the variables globally, as im going to be using it throughout the functions.[/QUOTE] How curious... your teacher requires Borland complier and to globally defined variables. tell me, what school do you go to? | |
Re: [QUOTE]At this stage I wouldn't bother de-globalizing your variables[/QUOTE] when would you suggest he start "de-globalizing" his design process? the inappropriate use of globals (ie 98% of the time) is one of the major systemic contributors to buggy, unmaintainable code. remove those globals now and get the pain over with … | |
Re: use "[URL="http://www.cplusplus.com/reference/clibrary/cstdio/fopen"]fopen()[/URL]" to open the file, and specify "read, binary" as the mode. [code=c]FILE * fp; fp = fopen("file.dat","rb");[/code] note the following: [quote]In the case of text files, depending on the environment where the application runs, some special character conversion may occur in input/output operations to adapt them to a … | |
how to use [code] tags? specifically, how do i type the opening and closing code tags in my post, as an example, without causing the code tags to activate? like this: [quote] HEY NOOB! USE CODE TAGS, AIGHT??? [B]<code=c>[/B] int main(void) { // your noob code here return 0; } … | |
Re: i actually worked at a place that used a Caesar Cipher to encrypt user passwords for the operators who ran the production equipment. and the "encrypted" password file was stored locally on every production computer. no joke. my first day there, i was like.... "LOL, WUT?" :-O | |
| |
Re: [QUOTE]Maybe there is another way of writing information into the output file.[/QUOTE] yeah... that would be the Standard C Library command,[URL="http://www.cppreference.com/wiki/c/io/fprintf"] fprintf()[/URL] not the C++ specific command you're trying to blindly force into the C program. | |
Re: not sure why the trailing NULLs are a problem. they probably existed in the memory before program startup, or were initialized in some manner during execution. the first NULL after "2:00 pm" signals the end of the string. why do you care that there are more than one? anything after … | |
Re: i tried to compile and i got this result: [code]rob@rob:~/Desktop/work$ gcc palindrome.c /tmp/cc2AgRo2.o: In function `main': palindrome.c:(.text+0x5f): warning: the `gets' function is dangerous and should not be used. palindrome.c:(.text+0x126): undefined reference to `strrev' palindrome.c:(.text+0x17c): undefined reference to `getch' collect2: ld returned 1 exit status [/code]two problems (1) gets? now why … | |
I'm an alcoholic and a sex addict. i also compulsively troll Daniweb. i just want to say that i'm glad all of you are here for me. *sobs* | |
Re: sounds great. i think several forums will welcome your expertise. FWIW, i almost got stampeded by some Buffalo in yellowstone park. i also dig Buffalo wings. :P | |
Re: C++ allows different definitions of pow() based on the type of argument. your problem appears to be that you're calling them with integer arguments which is ambiguous as it allows the pow() to fit more than one version. try casting the args as doubles: [icode]pow(2.0, (double)bBita - 1 - i);[/icode] … | |
Re: wish you'd use [code=c] tag for syntax highlighting. much easier to read. | |
Re: [QUOTE=Trav580;850838]I found it odd, that the post is identical to mine ...[/QUOTE] i found it odd that you joined this forum within a week of the doppelganger at the other site having joined that forum. in other words, i see that you, "trav", joined here about a week after your … | |
Re: generally speaking: [code=c] int * myPointer; int myValue; ... myValue = *myPointer; [/code] myValue now contains a copy of the value that is at the location currently pointed to by the pointer, myPointer. is this what you're asking? . | |
im looking a fully automated solution ... something a little more robust and safety-validated. manual testing has [URL="http://timetraveler.ytmnd.com/"]too many pitfalls[/URL] | |
Re: Hello, NickAx: it's so hard to take you seriously when you can't even spell "meat" correctly. anyhow, [URL="http://www.religioustolerance.org/easter1.htm"]Happy Eostre[/URL], everyone. . | |
Re: on linux you would just grep sysctl for a block of info [icode]$ sysctl -a |grep therm ...[/icode] or query for the specific variable [icode]$ sysctl hw.acpi.thermal.tz0.temperature hw.acpi.thermal.tz0.temperature: 54.0C[/icode] on windows... i dunno. you can always find some freeware GUI application [URL="http://www.softpedia.com/progDownload/SpeedFan--beta-Download-4103.html"]such as this[/URL], but unfortunately has no command line … | |
Re: ^ the question was answered and the OP marked it as "solved" already. so why do you think its necessary to come in and add your wrong answer? | |
... someone else's account? there's some new guy who signed up last week, using a Calvin avatar. i want him taken out. | |
Re: hi everyone.. i have to build a satellite navigation and control system in any language.. i have no clues on how to begin this.. can anyone plz send me an algorithm on controlling liquid propellant boosters using neural networks?? thanks | |
Re: welcome! and greetings from rainy seattle! i too remember old school slackware. Church of the Subgenius. Give me Slack. :) I use Ubuntu on my laptop, Fedora on my desktop. (right now im on my wife's Vista laptop, but please dont tell anyone i dont want to lose my street … | |
Re: wow! sounds cool. I think you scared everyone away! no seriously, welcome and I hope you stick around. sounds like you've got a lot of insight that could be quite helpful to people with tech and programming questions. and, who knows, maybe someone here might be able to help you. … | |
Re: WELOME Tony. feel free to ask questions in any forum related to your studies. I went back to college as an older student, myself, so i know the additional challenges you face. glad you're taking the initiative to retrain yourself. we're here to help | |
Re: welcome! please join our web development forums and contribute to the discussions or ask questions as you like. | |
Re: thanks for the SPAM, but i think I'll pass. potted meat products give me gas. | |
![]() | Re: hi tom, and welcome hope you stick around. python and java are very popular, and we're always in need of people to contribute to the discussions. |
Re: hi. welcome to daniweb. thanks for posting. please direct specific questions to the [URL="http://www.daniweb.com/forums/"]appropriate forum[/URL]. | |
Re: well, howdy backatcha, Tex. i remember using a Tandy when i was a kid. TRS-80. It hooked up to a TV. i dont remember the "sensation", though. welcome to daniweb. i see you've gotten started already! :) | |
Re: awsome programming skills are a long time coming, and probably not so easily to those who hate code! :P welcome, and good luck in your studies. lots of people here are willing to teach anyone who is willing to learn. | |
Re: welcome and good luck to you. dont think i can help you much with 3G mobile, but maybe you can teach me something. | |
Re: the string pointed to by checkSum will contain the numerical value of Total is expressed as a hexadecimal string due to the 'X' specifier. specifically, any letters (A-F) will be uppercase letters rather than lowercase due to the fact that the 'X' specifier is uppercase furthermore the string will be … | |
Re: no, you won't get any help here. you dont come in here and toss your wad of code on us and expect us to start cobbling away like your own little army of code elves. . | |
Re: [QUOTE=siddhant3s;851796]The "Test" of you professor is perhaps not good. ... What sky diploma told you must be true..[/QUOTE] i dont know, you [I]may[/I] be right.... BUT it's generally a Bad Idea for a first year programming student to tell the professor the fundamental premise of his assignment is flawed. unless … | |
Re: sup dawg i herd you like to loop while you loop so i put a coin in ... oh, never mind. that's so last September. | |
Re: certifications are mostly a waste of time, except perhaps Cisco. in any event, dont waste your own money on them. that said, an entry level IT support is not going to "make the employer pay for" 3rd party certifications. one option would be a 1-year program at a local community/tech … |
The End.