- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Computer Science/Compuer Engineer Student
- Interests
- Computers, Formula1, Taekwon-Do
Hi to everyone! I want to create a simple chat application using udp sockets. I want to have 2 applications that will be able to talk to each other.In particular app1 will send msgs to p2 and p2 will display them in stdout. Then maybe p2 sends a msg to … |
|
For a while now I've been doing this when I want to check the input of a function (in this example, to make sure they are not equal). [code] void foo(int a, int b) { assert(a != b); } [/code] But when the assert fails, I always find my self … |
|
Hi, i have created a data structure {heap based}, capable of manipulating up to 10 million elements....I noticed that i can't go above this number because i have serious memory leaks.... The problem seems to be that i haven't written a destructor!{i a bit used to garbage collection!} if i … |
|
In order to traverse a tree you could use something like this: [B]For inorder traversal:[/B] [CODE=C++] inorder(TreeNode* currentNode) { if (currentNode) { inorder(currentNode->LeftChild); cout << currentNode->data; inorder(currentNode->RightChild); } } [/CODE] [B]For preorder traversal:[/B] [CODE=C++] preorder(TreeNode* currentNode) { if (currentNode) { cout << currentNode->data; preorder(currentNode->LeftChild); preorder(currentNode->RightChild); } } [/CODE] [B]For post … |
|
hi, can anyone suggest any good book on compiler design and datastructures? |
|
OK so here is a fighter game I made..except my fighters power won't decrease and I can't get my fighters names to show up....*sigh*... any idea.. My functions could be wrong.. but I always thought it went above int main().. #include<iostream> using namespace std; int fighterOne (char fighter1Attack){ string fighter1Name; … |
|
hi ppl wassuuup i am used to the windows xp i just finished the downloadin of ubuntu but i saw sum screen shots and i got confused between the real ubuntu and the mac os so how can u please gime pictures of how this ubuntu looks like and aren't … |
|
#include<stdio.h> void AddMatrix(int[2][3],int[2][3],int[2][3],int,int); int main() { int i,j; int matrixA[2][3], matrixB[2][3], matrixC[2][3]; printf("This Program is to find the summation of matrixA and matrixB\n\n"); for(i=0;i<=1;i++){ for(j=0;j<=2;j++){ printf("Please enter matrixA[%d][%d]:",i+1,j+1); scanf("%d", &matrixA[j]); } } printf("\n\n"); for(i=0;i<=1;i++){ for(j=0;j<=2;j++){ printf("Please enter matrixB[%d][%d]:",i+1,j+1); scanf("%d", &matrixB[j]); } } printf("\n\n"); AddMatirix(matrixA,matrixB,matrixC); return 0; } void AddMatrix(int matrixC[2][3], … |
|
hi guys i see this advertisement in daniweb.com about microsoft dynamics... When i click to it, it goes to [URL="http://www.logiforms.com/formdata/user_forms/17265_3033495/53474/"]http://www.logiforms.com/formdata/user_forms/17265_3033495/53474/[/URL] where i should complete the form.... Shouldn't microsoft dynamics links transfer me somewhere to microsoft's website? Also, i am a Computer Engineering student, what use can it be for me … |
|
Hey, I'm just starting to learn C++ and I need some help with a header file. I'm using a Dummies Guide book and it says that I need to create a header file with the extension .h. SO I created a source file called header.h and put this at the … |
|
Hi guys, i have one question regarding alignment. Assume that you have the following struct: [code=c] struct align1 { double a; char b; int c; short d; }; [/code] Also assume: sizeof(double): 8 sizeof(int): 4 sizeof(char): 1 sizeof(short): 2 i would expect: sizeof(align1): 8 + (char padded to->) 4 + … |
|
hi, i have the following structure in the "simple application": application_folder | |--makefile | +-headers | | | +----func.h | | +src | | | +------ func.c | +------ main.c | | and here are the contents of the files: *func.h [code=c] float hey(float a, float b); [/code] *func.c [code=c] … |
|
Is there a difference, in terms of performance, between the two loops below? (myvec is type [icode]std::vector<int>[/icode].) [CODE]std::vector<int>::const_iterator pos; for (int i = 0; i < N; i++) { pos = myvec.begin(); // do something with pos }[/CODE] [CODE]for (int i = 0; i < N; i++) { std::vector<int>::const_iterator pos … |
|
Hey, I got bored so was making this program and i know how to get the highest and lowest number but I was wondering if there was a even quicker way, or would : [CODE=C++]if( number1 > number2 && number1 > number3) highNum = number1; else if( number2 > number1 … |
|
hi guys, it's been a while since i used c for anything so here goes a question tha may seem silly. I have 2 variable length arrays.... [code=c] int main() { int n = 5; int m = 6; int before[n][m]; int after[n][m]; array_function( 5, 6, before, after ); } … |
|
hi to everyone, In this semester we are having a class concerning High Performace computing / Parallel processing... In short i have the following questions: --- We are using pthreads and C. I think that i can use pthreads in c++ code but is there any way to use threads … |
|
hi guys, is there any gui framework for c++ which is easy for beginners |
|
I wish a happy 2008 to everyone on this forum. I just obtained the practise of programming{by the way it seems like a great book...} and i have the following code for linked list: [CODE=c] #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct Nameval { char *name; int value; struct … |
|
Ale Hallan people.. I have something like this: [CODE]void main(){ int flag=1,exit=1; cla_N *head=NULL; char class_name[NAME_LENGTH],choice[1]; double diversity; while (exit) { printf("Please choose one of the options below:\n" "1- Create/update class. \n" "2- Delete class. \n" "3- Insert new species. \n" "4- Delete species. \n" "5- Update species. \n" "6- … |
|
well i have 2 weeks reading and testing some C++ but unfortunately i fell into a wall. I succeed making an array with random length and random elements (yeah i did it)and i want to help me making those elements sorted. eg quicksort I read "algorithms in C++ " written … |
|
hi guys, i have the following code: main.c [CODE=c] #include <unistd.h> #include <stdio.h> #include <errno.h> #include <limits.h> //defines PATH_MAX #define _GNU_SOURCE #ifndef PATH_MAX #define PATH_MAX 255 #endif int main(void) { char mycwd[PATH_MAX]; fprintf(stderr, "\nThe PATH_MAX is %d\n", PATH_MAX); if (getcwd(mycwd, PATH_MAX) == NULL) { perror("Failed to get current working directory"); … |
|
hi, i am reading the book "Operating Systems Design and Implementation 3rd edition" which analyzes the minix source code... in the part of filesystems we see this code [CODE=c]PUBLIC _PROTOTYPE (int (*call_vec[]), (void) ) = { no_sys, /* 0 = unused */ do_exit, /* 1 = exit */ do_fork, /* … |
|
Please help me in self documenting the program below. All u have to do is, take a quick glance at the following code to see if u can understand wat each part is doing. If u have any difficulty in understanding(at a quick glance that is!), pls tell me so … |
|
Hi all! I've started a little late doing my final year university project, but I know what I want to do so it's probably better than a few of the other students out there! I do enjoy reading and studying about the wide variety of topics that are encompassed by … |
|
hello again i have mac computer and i have xcode on it. i am looking for some use full beginners books or tutorials. Right from start i have no previous knowledge of c++. can any one suggests any book for site for beginners which specially deal with g++ and xcode. … |
|
[B]Point.h[/B] [code=c++] #prag... #pragma once #include <iostream> using namespace std; class Point { private: int x; int y; public: Point(void); Point( int x, int y ); Point( const Point &xPoint ); ~Point(void); void setX( int x ); int getX() const; void setY( int y ); int getY() const; Point & … |
|
Hello, I am just starting to learn C++ and Decided to change from using Dev-C++ to Visual C++ 2008 express. but, there seems to be a problem.After compiling a few programs and showing off my new skills to my friend over MSN he tells me that he cant run my … |
|
Howdy, I am trying to write a program that reads in a .txt file with questions and multiple choice answers. The program then needs to search the text and convert the questions into a new format and write to a new file. I don't have much so far because I … |
|
hi, i have the following program [CODE]see the attachment[/CODE] when i try to compile through the command line {with the scipt compile} everything works fine... when i try to use my makefile...i get tons of errors.... It is my first serious try with makefiles and i would like some assistance … |
|
To cure A.I.D.S, this is the recipe for the cure: 1. One 8 ounce (oz) glass of water 2. 1/2 teaspoon of salt 3. Mix well and drink once This is known as The Philosopher's Elixir. |