Forum: C Mar 12th, 2007 |
| Replies: 27 Views: 5,734 Wow you've obviously got superior reasoning....:lol: Anyway, I guess I'll starting paying attention to such menial considerations. Regarding the programming suggestions I mean. Lol. |
Forum: C Mar 12th, 2007 |
| Replies: 27 Views: 5,734 I'd really appreciate a link to a standard specification either for C (?) or for Daniweb, seriously.
Ok, it does not exactly work like that, however, please inform me on how returning 1,... |
Forum: C Mar 12th, 2007 |
| Replies: 27 Views: 5,734 Well if he is learning then he is a beginner. So what is your point? |
Forum: C Mar 12th, 2007 |
| Replies: 27 Views: 5,734 Well considering the context of this debate, any considerate person would clarify such a deceiving addition.
Yeah.... well it is a good thing it is your opinion. :lol:
Lousy code?... |
Forum: C Mar 12th, 2007 |
| Replies: 27 Views: 5,734 Umm.... Lol.... I do make sure. :lol: |
Forum: C Mar 12th, 2007 |
| Replies: 27 Views: 5,734 Yeah, the only compiler I have access to is on a Windows workstation, which I'm not allowed to transport any data electronically. So I simply copy from the compiler IDE to the code posting. But... |
Forum: C Mar 12th, 2007 |
| Replies: 27 Views: 5,734 Here is another example program that might help you:
http://www.daniweb.com/code/showsnippet.php?codeid=661 (http://www.daniweb.com/techtalkforums/../code/showsnippet.php?codeid=661) |
Forum: C Mar 12th, 2007 |
| Replies: 49 Views: 10,337 Well all be.... you're right Joe! Here is the oh so massive change ;)
for (int i=0;i<max_value;i++) {
x = rand() % row;
y = rand() % col;
if (array[x][y] == 0)
array[x][y] = id;
... |
Forum: C Mar 12th, 2007 |
| Replies: 27 Views: 5,734 Then I suggest you get a new compiler ;) Lol. |
Forum: C Mar 12th, 2007 |
| Replies: 27 Views: 5,734 Here is a program that might help you: http://www.daniweb.com/code/snippet660.html (http://www.daniweb.com/techtalkforums/../code/snippet660.html)
Good luck, LamaBot |
Forum: C Mar 12th, 2007 |
| Replies: 1 Views: 5,334 Here is just a simple program to sort two strings inputted from the user entered on the command line. |
Forum: Posting Games Mar 12th, 2007 |
| Replies: 3,076 Views: 212,920 Sometimes I wake up in my computer chair when I fell asleep in my bed. |
Forum: C Mar 12th, 2007 |
| Replies: 27 Views: 5,734 Yeah.... the code I'd posted was an example. I indicated this when I said |
Forum: C++ Mar 12th, 2007 |
| Replies: 1 Views: 2,701 Yes it is possible! Here is a link to a tutorial on file processing:
http://www.functionx.com/cpp/articles/filestreaming.htm
Good luck, LamaBot[ |
Forum: C Mar 12th, 2007 |
| Replies: 49 Views: 10,337 I hope I don't "burn my bridges" by adding this but here it is. I'd like to say one thing, in reference to Walt's solution code to another. Consider the following which would do the exact same thing... |
Forum: C Mar 12th, 2007 |
| Replies: 27 Views: 5,734 What happens if a string doesn't contain a character for ascii 97 to 97+strlen in its name? If strchr encountered a character not located in the string, it'll return NULL. What if the strlen of name1... |
Forum: C Mar 12th, 2007 |
| Replies: 27 Views: 5,734 It is not good practice to use strlen in a for loop, especially for loops that must loop many times because strlen iterates through the array of characters one-by-one every time called (i.e. every... |
Forum: C Mar 10th, 2007 |
| Replies: 49 Views: 10,337 Problem solved by Walt's code.
LamaBot |
Forum: Posting Games Mar 10th, 2007 |
| Replies: 3,076 Views: 212,920 Cross reference the word "Love" in a book entitled "Hate" and you're an ironic dude. |
Forum: Posting Games Mar 10th, 2007 |
| Replies: 331 Views: 32,264 |
Forum: C Mar 10th, 2007 |
| Replies: 49 Views: 10,337 Ok, keep the code I just said to changed, changed and try this.
void populate(int array[][col], int row_size, int col_size) {
int x, y;
for (int... |
Forum: Geeks' Lounge Mar 10th, 2007 |
| Replies: 54 Views: 5,944 I've met some female computer nerd's. Unlike many of the nerd's I know, she can admit when she is wrong. |
Forum: C Mar 10th, 2007 |
| Replies: 1 Views: 1,354 Here is a list of Linux system calls, you might find something in there: http://docs.cs.up.ac.za/programming/asm/derick_tut/syscalls.html
Also, IF you're a Linux enthusiast I'd recommend getting a... |
Forum: C Mar 9th, 2007 |
| Replies: 49 Views: 10,337 When you cout the locations, try the following to see if it works then:
for (int i=0;i<=row_size;i++) {
for (int j=0;j<=col_size;i++) {....
This might be the reason you can only see around... |
Forum: C Mar 9th, 2007 |
| Replies: 3 Views: 1,084 Infraction's way works as well. Here is just a simple way to convert from double to char to accommodate the latter option:
char dblBuf[8];
sprintf(dbBuf,"%4.2f",solution);... |
Forum: C Mar 9th, 2007 |
| Replies: 3 Views: 1,084 Yes, it is called casting. Consider the following:
double d1 = 5.21;
int num;
num = (int)d1;
printf("%.2d", (double)num);
Output = 5.00 |
Forum: C Mar 9th, 2007 |
| Replies: 49 Views: 10,337 One last thing, I don't think you wan the following:
if(array[x][y]!=0)....
Reason; because you want to populate positions in the array aren't already occupied therefore you'd want to change... |
Forum: C++ Mar 9th, 2007 |
| Replies: 6 Views: 8,305 I'm quoting myself because didn't write all the code. Just noticed that. Here is the code:
#include <iostream>
#include <string>
using namespace std;
void stripSpace(string &);
int main() {... |
Forum: C Mar 9th, 2007 |
| Replies: 7 Views: 1,419 Well that depends I suppose. What common mechanisms do teams have, yet are implemented differently? Such as each team usually practices at certain locations, which is might be useful information. You... |
Forum: C++ Mar 9th, 2007 |
| Replies: 10 Views: 3,496 Oh.... sorry. Anyway, when she say's "kills" that could mean crash, but depends. My logic is that if there is a point in a program where an input string or etc. is not checked against its designated... |
Forum: C++ Mar 9th, 2007 |
| Replies: 6 Views: 8,305 I believe that is valid enhanced for loop syntax...? Anyway, I tried the while loop and it, of course, worked. :lol:
Look at this:
void stripSpace(string &str) {
int i; ... |
Forum: C Mar 9th, 2007 |
| Replies: 7 Views: 1,419 I think that is a cool project, btw. Anyway for the division, teams and league I'll give some fastly written code that might spark some ideas in that creative head of yours. Here is some example... |
Forum: C++ Mar 9th, 2007 |
| Replies: 6 Views: 8,305 I've been trying to figure what I'm doing wrong all day. I'm becoming discouraged. Can anyone help me out?
void stripSpace(string &str) {
int i,j,len=str.length();
for... |
Forum: C++ Mar 8th, 2007 |
| Replies: 10 Views: 3,496 What if when she buffers the data read from the socket, it overwrites memory on the stack perhaps causing the instruction pointer to return to a false address after a function call, or to an address... |
Forum: Network Security Mar 8th, 2007 |
| Replies: 3 Views: 2,477 I guess in a sense, but not quite. A kerberos ticket is assigned to a user when he or she authenticates to a network with his or her PennKey and password. The ticket sent along with the packets or... |
Forum: C Mar 8th, 2007 |
| Replies: 21 Views: 5,604 You might want to take the amount entered by the user, check to see if the amount is greater than what the coins are worth and skip that coin if it is. Once you reach the coin that doesn't exceed the... |
Forum: C Mar 7th, 2007 |
| Replies: 49 Views: 10,337 Walt, when I'm using for loops, my C++ compiler allows me to declare and initialize a variable within a for loop. I don't know if that is valid standard C syntax though. Here is a link briefly... |
Forum: C++ Mar 7th, 2007 |
| Replies: 8 Views: 16,924 Bernt.tc did you care to click the link I'd provided above? The page contains sample code. Here is an example nevertheless:
#include <windows.h>
#include <malloc.h>
#define TOTALBYTES ... |
Forum: C Mar 7th, 2007 |
| Replies: 49 Views: 10,337 Yeah that is probably the problem. An easier way to confirm this is just declare i and j as integers before executing the for loop. Sometimes when I'm writing a reply post, another post gets posted... |
Forum: Assembly Mar 7th, 2007 |
| Replies: 6 Views: 2,060 Actually, I was going to try and find a website that would of accomodated his or her need to learn assembly written in his native language that he or she would understand. That'd probably make it... |