Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
~23.4K People Reached
About Me

Computer Science/Compuer Engineer Student

Interests
Computers, Formula1, Taekwon-Do
Favorite Tags

92 Posted Topics

Member Avatar for n.aggel

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 …

Member Avatar for Ambreshbiradar
0
1K
Member Avatar for daviddoria

[QUOTE=Narue;834109]>So this should indeed be handled with an assert Once again it depends. If you have absolute control over the size of both vectors in the code, then an assertion is warranted because a mismatch is a logic error. If you don't have control over the size (it's based on …

Member Avatar for vibhor48
0
293
Member Avatar for n.aggel

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 …

Member Avatar for ani malviya
0
221
Member Avatar for n.aggel

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 …

Member Avatar for jbel
0
422
Member Avatar for n.aggel
Member Avatar for s_sridhar
0
166
Member Avatar for cjwenigma

Here is a better indented code {i used astyle to do this...} [CODE=c++] #include<iostream> using namespace std; int fighterOne (char fighter1Attack) { string fighter1Name; // char fighter1Attack; int fighter2Power=1000; string fighter2Name; cout << fighter1Name << " please choose an attack (P) = Punch, (K) = Kick => "; cin >> …

Member Avatar for peter_budo
0
129
Member Avatar for hamada_1990

i now the reply is 2 months late...but ubuntu has a huge collection of applications...What haven't you find?

Member Avatar for hamada_1990
-2
433
Member Avatar for fiz

please use code tags...so that your code is more readable...this way more people can help you.... for c++ code, type (code=c++)//your code goes here(/code) e.g. #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++){ …

Member Avatar for xavier666
0
104
Member Avatar for n.aggel

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 …

Member Avatar for Fred Mackie
0
103
Member Avatar for DanDaMan

Hi, i don't have a compiler in front of me.... but the program is small and easy so here is something that should work. main.cpp [CODE=c++] #include <cstdlib> // #include <iostream> //don't include things that you don't use... #include "header.h" //using namespace std; //you don't use anything from std namespace …

Member Avatar for DanDaMan
0
160
Member Avatar for n.aggel

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 + …

Member Avatar for n.aggel
0
173
Member Avatar for n.aggel

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] …

Member Avatar for n.aggel
0
164
Member Avatar for titaniumdecoy

[QUOTE=Narue;644464]>Is there a difference, in terms of performance, between the two loops below? It depends on your compiler. There are tons of factors that come into play, such as how your compiler manages stack space, whether the underlying type of const_iterator is a simple pointer or an object, how temporary …

Member Avatar for Narue
0
149
Member Avatar for Black Magic

[QUOTE=vijayan121;609134]using c++09 variadic templates [url]http://www.osl.iu.edu/~dgregor/cpp/variadic-templates.pdf[/url] [code=c++09]#include <iostream> template < typename T > T largest( T first, T second ) { return first > second ? first : second ; } template < typename T, typename... U > T largest( T first, U... rest ) { return largest( first, largest( rest... …

Member Avatar for n.aggel
0
150
Member Avatar for n.aggel

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 ); } …

Member Avatar for n.aggel
0
378
Member Avatar for n.aggel

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 …

Member Avatar for n.aggel
0
172
Member Avatar for MxDev

i don't think that gui frameworks are the best way for a beginner to start....You could try QT{its portable and for non commercial use it is free...}

Member Avatar for Duoas
0
77
Member Avatar for n.aggel

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 …

Member Avatar for n.aggel
0
80
Member Avatar for Archimag

[QUOTE=Archimag;501397][quote=salem]Are you supposed to restrict yourself to the few functions 'teacher' has told you about so far?[/quote] Well....YES...it's stupid i know, but that's how it works....and they are very strict about that. THANX for your help people...appriciate it....will try to implement some of the things you told me....But it's really …

Member Avatar for n.aggel
0
121
Member Avatar for rizoshar

hi rizoshar, -first of all try to use code tags and indent your code to make it more readable.... read [URL="http://www.daniweb.com/forums/announcement8-3.html"]here[/URL] to learn how to use code tags - SEDGEWICK uses templates, you seem to be a beginner so try not to use templates until you learn a bit more.... …

Member Avatar for Narue
0
140
Member Avatar for n.aggel

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"); …

Member Avatar for ssharish2005
0
649
Member Avatar for n.aggel

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, /* …

Member Avatar for n.aggel
0
104
Member Avatar for Karkaroff

421 lines of code without a comment.... i think that self explaining code is about a dozen of lines.. not 421 !!! So you are convinced that if you like these 421 lines after a year or so you will remember what the code does? :P anyway this is an …

Member Avatar for n.aggel
0
300
Member Avatar for naveed.pasha

although i cannot help you with what you want, maybe you would get more help if you made this post in a more security oriented forum {i can't suggest one, but there must be alot of them}...

Member Avatar for Salem
0
585
Member Avatar for peeta

as Comrade Ogilvy said :: [inlinecode]int main(void)[/inlinecode] is the correct entry point. I don't know the ide you are using but from the output you posted it seems that you have 2 object files {firstprogram.o and main.o} which i guess that derive from 2 source files {firstprogram.c and main.c}... and …

Member Avatar for peeta
0
119
Member Avatar for Max_Payne

to rephrase what lerner already said{and add a little sugar!} if you want to output to screen {a line, a dot or whatever} you must use directly the OS's api or some framework thats supports graphics like Qt , MFC or .NET..... On the other hand if you just want …

Member Avatar for Max_Payne
0
586
Member Avatar for Nosgammot

[QUOTE=Nosgammot;496636]Thanks for your help. I haven't been able to get it to work so i'm just going to stick with Dev-c++, all this trouble just because I wanted an IDE with code wrap...[/QUOTE] if you want just the code-wrap future you can use any good editor availible.... i.e. [URL="http://notepad-plus.sourceforge.net/uk/site.htm"]notepad++[/URL], [URL="http://www.textpad.com/"]textpad[/URL] …

Member Avatar for n.aggel
0
145
Member Avatar for Deadvacahead

Sorry to resurect an old post... but i haven't read it until now... i disagree with this statement: [quote] And that is why his post was more counter-productive than helpful. [/quote] someone could categorize programmers in the following categories: [LIST][*]cat1: Those who want to learn the art of programming {or …

Member Avatar for n.aggel
0
157
Member Avatar for n.aggel

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 …

Member Avatar for Barefootsanders
0
93
Member Avatar for use4d

[QUOTE=jbennet;436115]That was a crappy joke. Love the avatar narue :)[/QUOTE] indeed great avatar narue!! as for the joke....it sucks....

Member Avatar for jasimp
0
435
Member Avatar for n.aggel

hi lets say you have a big application and you want to break it up to many files... The ideal would be if you can have the application in one .c {i.e main.c} file your types and includes in another file {types.h} and your functions in a seperate file {functions.c} …

Member Avatar for n.aggel
0
98
Member Avatar for n.aggel

hi, i have the following problem:: i want to read a string from the stdin. The string may contain white spaces so {i think} the scanf family of functions is out of the question... I think the most appropriate function for this case is fgets {if i am wrong please …

Member Avatar for iamthwee
1
324
Member Avatar for n.aggel

in the book "advanced programming in the unix environment" the authors give the following function to "deamonize" a process [CODE=c] void daemonize(const char *cmd) { int i, fd0, fd1, fd2; pid_t pid; struct rlimit rl; struct sigaction sa; /* * Clear file creation mask. */ umask(0); /* * Get maximum …

Member Avatar for Salem
0
142
Member Avatar for n.aggel

hi, i was wondering if it is possible to send a struct through sockets... thanks in advance, nicolas

Member Avatar for n.aggel
0
264
Member Avatar for nurulshidanoni

please use code tags or other people won't be able to help you.... here is your code [CODE=c++]#include <iostream> #include <conio.h> #include <cstdlib> #include <cmath> #include <cstdio> #include <ctime> using namespace std; int i; int x[7]; int A[7], B[7], C[7], D[7], E[7], F[7]; int Min( const int *A, const int …

Member Avatar for Nick Evan
0
158
Member Avatar for RohitSahni

i think this topic is called interprocess communication {i am just starting learning about it..}

Member Avatar for n.aggel
0
86
Member Avatar for n.aggel

Hi, if we had the following program:: [CODE=c++]int main() { int a, d; int b=12; int c=13; a=b+c; d=b+c; return 0; }[/CODE] what would gcc produce as a result? would it be:: [CODE]fetch b fetch c add store to a fetch b fetch c add store to b[/CODE] Or something …

Member Avatar for n.aggel
0
160
Member Avatar for n.aggel

hi, i want to begin socket programming and interprocess communication but i don't where to begin....can anyone suggest some sources?? thanks in advance, nicolas PS:: sorry if the question is vague, but it isn't easy to be more specific....

Member Avatar for stupido
0
191
Member Avatar for tom1989
Member Avatar for vmanes
0
92
Member Avatar for n.aggel

hi, i am having a project where i must implement a method that takes measurements(random numbers) on specific time intervals.This means that i should read (for example) a number every 5minites...I ve been told for a sleep function but i can't find any info about it....Any thoughts on how i …

Member Avatar for HLA91
0
320
Member Avatar for toko
Member Avatar for toko
0
125
Member Avatar for nquaoser

[QUOTE=Narue;210462]>it would be very easy to mis-read the intention of that code That's one reason. Here are a few more: 1) It's too compact to be readable. 2) The performance is deceptive (it's usually slower). 3) The tricks used are obscure. 4) Lint goes nuts (abuse of dangerous constructs). 5) …

Member Avatar for n.aggel
0
338
Member Avatar for n.aggel

hi, i am reading the book "The c++ standard library -- a tutorial and reference"{N.M.Josuttis} in the beggining of the 6th chapter it says{in regard to container initialization}:: [CODE=c++] std::deque<int> c( (std::istream_iterator<int>(std::cin)), (std::istream_iterator<int>()) );[/CODE]{the weird indentation is on purpose} instead of:: [CODE=c++]std::deque<int> c(std::istream_iterator<int>(std::cin), std::istream_iterator<int>());[/CODE] because [QUOTE="N.M.Josuttis"]In this case, c declares …

Member Avatar for n.aggel
0
114
Member Avatar for imonriddilin

[QUOTE=imonriddilin;446663]they are having us use PUTTY, which runs on linux. and they want the output to be something like this (this is in one turn) y .r(yr) ..g(yrg) ...g(yrgg) not just rewritting the begining character in the output[/QUOTE] PuTTY is not a compiler, it is a free software SSH, Telnet, …

Member Avatar for n.aggel
0
129
Member Avatar for n.aggel

I just started learning about stl.... the problem is that 3 cases that i consider "equivelant", don't do the same thing...so the question is, why they are not equivalent? here are the statements: [CODE]cout<<(char)toupper(*pos)<<" "; //this works![/CODE][CODE]cout<<toupper(*pos)<<" "; //without cast it doesn't work, why?[/CODE][CODE]*pos=toupper(*pos); //and this also doesn't work cout<<*pos<<" …

Member Avatar for n.aggel
0
401
Member Avatar for jrice528

some questions concerning the code you provided:: [code=cplusplus] // cin >> skipws >> dec ; // being safe, ignore this for now //***you add this, just for the case that the default input is other than decimal? is this possible? // also ignore cin.clear/cin.ignore; by spec. user should get 'stuck'! …

Member Avatar for WaltP
0
122
Member Avatar for mattb_25

[QUOTE]1. Write a program that asks the usr for a positive integer value. The program should use a "while-loop" to get the sum of all the integers from 1 to the number entered.[/QUOTE] post some code.... where did you get stuck? tip:: you read a number and then you use …

Member Avatar for Ancient Dragon
0
107
Member Avatar for eranga262154

i don't know how easy it to do this with Visual Studio and MFC...{from posting in this forum i am guessing that you don't do c++/cli...} I had a simular problem for a university project and i ended up using qt framework... They have a free version and it is …

Member Avatar for n.aggel
0
171
Member Avatar for daniweb2013

[QUOTE=Ancient Dragon;443259]When using the old headers with .h extension you don't use "using namespace std". Check to see if your compiler supports the new headers without an extension and use those instead. The old files are out-of-date and will cause lots of other problems if you attempt to use current …

Member Avatar for n.aggel
0
2K
Member Avatar for GirlInterrupted

Salem is right... >>to find a group of tutorials with quick examples for beginners I am not a fan of tutorials...maybe you should try reading a {beginner or intermediate} book on c++.....

Member Avatar for Duki
0
89

The End.