No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
61 Posted Topics
Re: malloc returns a block of memory that is allocated for the programmer to use, but is uninitialized. calloc allocates memory and then initializes it. realloc is used to grow or shrink a block of memory. | |
I'm stuck in a situation where I'm being forced to park [url]www.parking.com[/url] at [url]www.lot.com[/url]. As much as I wish I could do a 301 redirect, it's just not possible. How do I make sure that lot.com isn't negatively impacted SEO wise? My initial thought was to run $_SERVER['SERVER_NAME'] (it's a … | |
| |
Re: Look into the curses library, or some variation thereof. | |
Hey guys. I am running a php script (locally) which runs through a loop several hundred times. Each time through the loop the same computation is done with the exception of two input variables being different. The input variables are obtained with a MySQL query based on the counting variable … | |
Hey everyone, I finished my site several weeks ago and I also made an affiliate program to go along with it because I figured it would help if other people were basically doing the advertising for me. The problem is that nobody has signed up for the program yet. I … | |
Re: Read [url=http://www.daniweb.com/forums/announcement8-2.html]this[/url]. | |
Re: I have been programming for five semesters now. At least one class each semester uses C++ so I would say I've been programming in C++ for about three years. I've also gotten to play around with Java, Scheme, MySQL, etc. | |
Re: How long do you think it's going to take you? It's hard to just throw out a number. I think you would be wise to deeply analyze what needs to be done and how long you think it will take you, and then apply an acceptable hourly rate to that … | |
Hi, I have two roommate's that download movies all day, every day. It's to the point now that there is no bandwidth left for me to even surf the Internet with. My question is: Is there anyway to install some kind of software on my computer (ubuntu 7.10 or windows … | |
Re: [QUOTE]I have everything writen right but somthing is worng please help. [/QUOTE] Could we have a bit more detail? | |
Re: You can't just give us a couple hundred lines of code and say that it doesn't work. What doesn't work, where does it fail, and what is the output? | |
Hi, I have two roommate's that download movies all day, every day. It's to the point now that there is no bandwidth left for me to even surf the Internet with. My question is: Is there anyway to install some kind of software on my computer (ubuntu 7.10 or windows … | |
Re: You need something like the following...expanding on the previous code. [code=c++] #include <iostream> #include <cstdio> using namespace std; int main() { int grades[5]; char ch; for (int i = 0; i < 5; i++) grades[i] = 0; cout << "Enter q to exit, or enter grades" << endl; while(ch != … | |
Re: He's not asking you to be a good programmer. He is just asking that you make an effort first and then we will be glad to help. Write the code the way that you think it should be written and then post the code and the errors. | |
| |
| |
| |
Re: [QUOTE]Does it have something to do with the braces being gone off of the else?[/QUOTE] It has everything to do with this - you answered it yourself. There are no braces associated with the "else" statement so that means that only the line immediately following the "else" statement is included … | |
Re: I'm not really sure what you are asking. Do you just want a program that calls that function? [code=c++] #include <iostream> using namespace std; int main() { print_splash(); return 0; } [/code] | |
Re: What does that mean? Do you want C++ development software? or software that was designed using C++? or C++ compilers? | |
Re: Do you mean which software or which language? I would go for php and MySQL (obviously html, etc. as well). As far as software goes, just use a text editor. | |
Re: Finding the largest and smallest numbers in a set using "if" statements is normally a horrible idea, but if the size is only 4 then I would recommend some "if"s. [code] smallest = values[0]; largest = values[0]; for(i = 0; i < 4; i++) { if(values[i] > largest) largest = … | |
Re: Is this page on the internet, or are you viewing it directly from your filesystem? If it's on the internet, then telling the page where the file is on your home computer doesn't do any good. Also, double check to make sure that the path you entered is a working … | |
Re: Yes. Or just deal with the upper and lower cases like you did with everything else. i.e. [code] if( (userPlay== 'R' || userPlay == 'r') && (cPlay == 'P' || cPlay=='p')) [/code] | |
| |
Re: If you just want the value to always be positive than you can do: [code] if(deposit < 0) deposit *= -1; [/code] | |
Re: That loop is saying that you are going to start the loop with i initialized to 0, and increment i by 1 for each iteration. You will keep looping as long as i is less than 5. So, the first time through the loop i will be 0, then 1, … | |
Re: This is the way I would approach it: Call a function Eigen from main. Have an array of ints in eigen. Store the first number in array[0], second in array[1] and so on. For example, with the number 2349, store 2 in array[0], 3 in array[1], 4 in array[2], 9 … | |
Re: [quote] int row(0), column(0); int arow(0),acol(0), brow(0),bcol(0); int matrix_a[arow][acol]; int matrix_b[brow][bcol]; int i(0), j(0); int temp(0),value(0); [/quote] What are you trying to do here? | |
Re: You need to get "royalty free" templates and images. These are sometimes not free, but they allow you to use them without disclaimers. | |
Re: [quote] while (one==0||two==0......) {zero=zero + 1;} [/quote] This will be an infinite loop if there is a 0 in the row. [quote] if(one==0) {zero=zero+1;} else if(two==0) {zero=zero+1;} else if (three==0) {zero=zero+1;} else if (four==0) {zero=zero+1;} else if (five==0) {zero=zero+1;} [/quote] When you use "else if" you are saying to only … | |
Re: In addition to listing your code you need to explain what it is that you are expecting your code to do, and what it is doing. | |
Re: If you are allowed to use two temporary integer variables, then use both. Have one variable,VAL, that stores the value of one single cell at any given time. Have the other variable, LOC, store the location in the spreadsheet. I.e. if you have already moved 27 cells than LOC = … | |
Re: Wow, it looks like you've put a lot of effort into working this problem out. | |
Re: you could try installing a virtual box on top of your linux OS. | |
I want to install some kind of virtual box software so I can run Windows from inside Ubuntu. I have heard of a few such software packages, including virtualbox and vmware, and I was wondering if anybody here had any recommendations on what to use. Also, I already have Windows … | |
Re: Give the thread a meaningful title next time. If you provide some code to show what you have tried so far and better explain what the problem is I'm sure more people will be willing to help you. | |
Re: I copied that into my browser and just got a blank screen. | |
Re: That looks like a template you got off the web. I guess it's not really my place to say, but shouldn't a web developer develop his own website? | |
I have a linked list of structs, with each struct having a char* and an int. When I try to print the list I get a seg fault. If I just print the int however it works. What am I doing wrong so the char* won't print? printf("%s %d\n", p->name, … | |
Re: [code] #include <stdio.h> int main() { printf("abcdeedcba\nabcdxxdcba\nabcxxxxcba\nabxxxxxxba\naxxxxxxxxa\n"); return 0; } [/code] | |
Ok, I know C/C++ really well, but just started Java today and am having an issue. I have an assignment where I have to ask the user how many names he wants to enter, and then have him enter all of the names. After all of the names have been … | |
Re: I would recommend using CSS, but I'm sure you can fix this problem without doing so. I don't use tables, so I am not familiar with the problem. | |
Re: Just copy and paste the info from your old html page into the new one that already has all the style tags. | |
Re: Charge him as much as you think he will pay comfortably. By this I mean don't be greedy. You want to get as much as possible but still make sure that you keep him as a client. If you are just starting you need to make sure you hang on … | |
Re: That's not really necessary if you are compiling something for you own use. | |
Re: What operating system are you using? I personally like g++ the best, but if you use Windows you may want to go another route. |
The End.