Forum: C++ Sep 23rd, 2009 |
| Replies: 2 Views: 616 If you understand the concepts and have written the insert function, then this should not be all that difficult to understand. Just for reference:
So one solution would be to write a function... |
Forum: C++ Sep 23rd, 2009 |
| Replies: 20 Views: 745 Hey. Seems like you've made some progress. Thanks great! Below is my solution but as noted previously, there are many. Hope it helps!
/**
* @file printV.c
* @description Prints a V shape.... |
Forum: C++ Sep 19th, 2009 |
| Replies: 20 Views: 745 yeah, you could do it that way but it is highly inefficient. there is one way that you can do this using 2 for loops and a simple if/else statement. however codeguru_2009 has an even more efficient... |
Forum: C++ Sep 18th, 2009 |
| Replies: 20 Views: 745 It would probably be easier to generate a small 'V' by hand and figure out what coordinates that the '#' lands on. Then you can decipher the pattern and come up with what you would need to be put... |
Forum: C++ Jul 27th, 2009 |
| Replies: 5 Views: 545 That would be my first suggestion. You could also think about using pipe()/fork() and have one process listen for messages while the rest of your program executes. |
Forum: C++ Apr 2nd, 2009 |
| Replies: 2 Views: 381 Good start but there are numerous problems with your code. I added comments and highlighted them in red for you to see where you went wrong.
Also, one thing i would suggest is review how to... |
Forum: C++ Mar 26th, 2009 |
| Replies: 4 Views: 405 ahh, im programming in linx environment so i dont thinkt that will help.. thanks though. |
Forum: C++ Mar 26th, 2009 |
| Replies: 4 Views: 405 HI,
I'm trying to write an application in C++ that has two things - a TCP server (listen server) as well as a TCP client where it can send to other TCP servers. I currently have both parts set up... |
Forum: C++ Mar 26th, 2009 |
| Replies: 9 Views: 451 This should take care of it for you as long as you have a head pointer which I'm assuming you do otherwise how would you access your list?
~CList() {
// Create a tmp node
CNode node;... |
Forum: C++ Mar 26th, 2009 |
| Replies: 1 Views: 448 Hi,
I'm trying to code a program that involves a double linked list. I have the linked list working but the information in the link list need to be shared between 2 different classes. Is it... |
Forum: C++ Feb 19th, 2009 |
| Replies: 0 Views: 540 I'm writing a simple networking application. I'm using berkley sockets and was wondering if there was a way to enable the UDP w/ ACK option when setting up a udp socket. I know the UDP protocol has... |
Forum: C++ Apr 24th, 2008 |
| Replies: 1 Views: 2,297 Hey all,
I'm trying to create a directory monitor that will watch a certain directory and print changes made to that directory. I was wondering if there were any C/C++ libraries that provide an ... |
Forum: C++ Dec 10th, 2006 |
| Replies: 1 Views: 1,866 Hey everyone. Im having some problems with mergesort. Im supposed to run the mergesort function then print to a file. It's not printing.. Can someone show me where im going wrong?
This is the... |
Forum: C++ Dec 9th, 2006 |
| Replies: 4 Views: 1,372 Ok. So I wrote some more code and I got crazy errors. I don't know what to do from here. Any suggestions? Code is below and is well documented to show how it should function.
#include... |
Forum: C++ Dec 9th, 2006 |
| Replies: 4 Views: 1,372 wow im retarded.. thanks a lot. I knew it was something simple but I didn't see it. Thanks again! |
Forum: C++ Dec 9th, 2006 |
| Replies: 4 Views: 1,372 Hey everyone. I have a project to work on but for some reason I cant get my basics to work. Im trying to read in from a file and just printing what I read in from file to an outfile but its not... |
Forum: C++ Nov 28th, 2006 |
| Replies: 1 Views: 1,074 Hey guys, I was writing code or DLL's (doubly linked lists) and I think I have everything right but it keeps giving me a makefile error. My code is below along with the error log. ANy help would be... |
Forum: C++ Nov 12th, 2006 |
| Replies: 9 Views: 3,007 try something like this. because you are limited to while/if loops its kinda of primitive but it should work.
int i=0;
temp=0;
cin>>Nitems>>endl;
while(i<(number of items)){
... |
Forum: C++ Nov 9th, 2006 |
| Replies: 10 Views: 2,726 thanks. for the info on vectors. we have not covered them in our class and the program was supposed to be written using a class. thanks for all the help. i really appreciate it. |
Forum: C++ Nov 9th, 2006 |
| Replies: 10 Views: 2,726 lol wow sorry. i threw that code together and i didnt even see the basic errors. but i believe this should be more like it:
#include <iostream>
#include <fstream>
using namespace std;
... |
Forum: C++ Nov 9th, 2006 |
| Replies: 10 Views: 2,726 Thanks for the help gents. I cant treat the array as a 1d array because I need to perform matrix opperations on it later in the program but I think i worked a few of the bugs out. however ive been... |
Forum: C++ Nov 7th, 2006 |
| Replies: 10 Views: 2,726 Thanks for the quick response. this might be a dumb follow up, but what does the size(int) do at the end of that new array?
and one more thing... i dont think i was clear when i said this in the... |
Forum: C++ Nov 7th, 2006 |
| Replies: 10 Views: 2,726 Hey guys. I have a problem. I have to read in 2 arrays from 1 file. I know how to read in an array with known elements but this time the number of rows/columns are in the file. The first line has the... |
Forum: C++ Oct 23rd, 2006 |
| Replies: 6 Views: 1,206 wow thanks a whole lot. now that i know what to do it seems so simple. thanks again! |
Forum: C++ Oct 23rd, 2006 |
| Replies: 6 Views: 1,206 how would you go to the next row after you do what you have to do with the first set of numbers? |
Forum: C++ Oct 23rd, 2006 |
| Replies: 6 Views: 1,206 sorry. each row has numbers in it. its formated like this:
3 53342 6343 1232
4643 3213 64 3
2 6 3 1 |
Forum: C++ Oct 23rd, 2006 |
| Replies: 6 Views: 1,206 Hey guys. Ive been working with fstream for about 2 hours and i give up. My problem is I have a text file with an unknown number of rows. Each row has a known number of items. i cant figure out how... |
Forum: C++ Oct 7th, 2006 |
| Replies: 4 Views: 4,491 Thanks for the quick response. I think thats what im gunna do. I just wanted to see if it would be easier seeing as i know C++ better but thanks! |
Forum: C++ Oct 7th, 2006 |
| Replies: 4 Views: 4,491 Hey everyone. I dont know if anyone here can help me but I run a site powered by the Joomla CMS. I wanted to design a component for my site and I was wondering if i could use C++ to design it instead... |
Forum: C++ Oct 7th, 2006 |
| Replies: 5 Views: 1,379 Hey thanks for all the help but I figured out the syntax. When I declare the constructor i have to declare it like this:
circle(T=0,T=0,T=0,T=0);
So it will set the initial values of the... |
Forum: C++ Oct 3rd, 2006 |
| Replies: 5 Views: 1,379 Thanks for the response. But one question, the program is supposed to not be constricted to a certain type of numbers. It is supposed to accept all types ie float, int, double, etc. Is there a way to... |
Forum: C++ Oct 3rd, 2006 |
| Replies: 5 Views: 1,379 Hey guys. Ive been trying to write this program for a while and I keep getting errors on line 78, "Circle undeclared." I think it has something to do with the constructors and templates. I dont think... |
Forum: C++ Oct 3rd, 2006 |
| Replies: 1 Views: 930 Hey everyone. I had a few questions and I was hoping you could point me in the right direction. I'm currently taking a C++ class in college. I learned C last year and the transition has been... |