506 Posted Topics

Member Avatar for bala24

1. References are similar to pointers. But not same. That's why the std committee came up with 2 different things. :). 2. "references same as a constant pointer to a variable" => Yes, a reference and a const ptr to a var would work "almost" same way (you'll use different …

Member Avatar for bala24
0
124
Member Avatar for ssimkhan

May be you have an old .class file in your path. Check by explicitly setting the classpath OR passing it on command line OR running on a different machine/window.

Member Avatar for stultuske
0
155
Member Avatar for jaepi

See man fstat fstat gives you struct stat for a given file. This struct has following info abt your file: [code=c] mode_t st_mode; /* File mode (see mknod(2)) */ ino_t st_ino; /* Inode number */ dev_t st_dev; /* ID of device containing */ /* a directory entry for this file …

Member Avatar for jaepi
0
707
Member Avatar for phalaris_trip

> Or should I figure out how to use Visual Studio to do it? >> Visual Studio won't do it for you since its an IDE, not a language. Standard C++ has no inbuilt support for GUI, Networking and the likes. You have to resort to third party libraries. I …

Member Avatar for phalaris_trip
0
177
Member Avatar for arunprashanth

(assuming you're talking abt HTTP Sessions) AFAIK they are stored in memory and not serialized to any normal flat file. (although you might wanna check if HttpSession class implements serialize or not)

Member Avatar for jwenting
0
82
Member Avatar for mankichi

>> "thanks a lot!!!" If you know teh question and the answer, "you're welcome"..

Member Avatar for thekashyap
0
46
Member Avatar for thekashyap

Donno how many of you know abt this but it's one of the best time pass I've come across.. Created by some of IIM-I guys (Indian Institute of Management - Indore) it is simply-too-good.. Original [URL="http://www.iimi-iris.com/iris/irising/klueLESS/"]KlueLess Part 1[/URL]. Don't forget to [URL="http://www.iimi-iris.com/iris/irising/klueLESS/game.asp"]read the rules[/URL] without which you won't get anywhere. …

Member Avatar for thekashyap
0
57
Member Avatar for pyapplico

Don't forget to get a compiler and do the exercises. :) You can find a lot of them in a sticky thread at the top of this forum. It's a nice collection to get started on almost all aspects of C++.

Member Avatar for hinduengg
0
164
Member Avatar for himanjim

Donno exactly what you wanna know abt the 2 methods but in simplest words when applies to a tree structure with say 3 levels: BFS: Will test all nodes on one level before moving on to the next level. DFS: will test all child nodes of the all levels belonging …

Member Avatar for thekashyap
0
168
Member Avatar for j3p0yz

Just reformat the code and the error will be glaring in your face. Use Astyle e.g. Also use the code tags: [code=java]class waiters { private double tab; public waiters(String name); { System.out.println("my name is"+name+",i''ll be your waiter!"); tab = 0.0; } public double priceof(String s) { double price; if(s.equals("chicken")) { …

Member Avatar for Ezzaral
0
89
Member Avatar for kinggarden

A few comments: 1. Given it's C++ problem, try using C++ containers (instead of array) e.g. vector/list/map. 2. You don't really need to force use of a design. Not yet at least. 3. Comment on the design: Class Data should not be responsible for insertion/deletion/.. Look at it purely from …

Member Avatar for Narue
0
207
Member Avatar for senior_mustafa

AFAIK these are the famous/unbeatable/the-best books on this topic: The Art of Computer Programming by Donald E. Knuth It has 4 volumes: Art of Computer Programming, Volume 1: Fundamental Algorithms Art of Computer Programming, Volume 2: Seminumerical Algorithms Art of Computer Programming, Volume 4, Fascicle 2: Generating All Tuples and …

Member Avatar for Narue
0
82
Member Avatar for CodyOebel

If you need to get the name locally (your program runs on the machine whose name you want to get) you can use gethostname, see [URL="http://www.codeguru.com/cpp/i-n/network/networkinformation/article.php/c2487/"]this example[/URL]. If you need to do it remotely (your program runs on one single machine and needs to get names of all machines in …

Member Avatar for thekashyap
0
79
Member Avatar for sadaka
Member Avatar for bala24

[quote=vijayan121;387507]members or base class sub-objects cannot be initialized inside the body of the constructor; they can only be assigned to. initialization is always before the body of the constructor executes.[/quote]Think that answers the question adequately. Just to be clearer.. the difference between initialization and assignment is: 1. Initialization is done …

Member Avatar for ~s.o.s~
0
116
Member Avatar for fryForever

Donno of any tutorials purely for gaming purpose.. I'm sure you'll find lotsa threads talking abt problems with gaming here.. I would suggest that you pick an idea from one of those and start off.. What you'll need to learn of course is user I/O which you say already know.. …

Member Avatar for Sturm
0
110
Member Avatar for le0pard13

Does this help ? [code=bash] #!/bin/bash file_with_workstations_list=/tmp/input_list.txt while read workstation_name do #do you stuff with workstation_name echo "Read workstation name: " $workstation_name done < $file_with_workstations_list [/code]

Member Avatar for le0pard13
0
153
Member Avatar for punnoose0607

Not clear what's the problem? What's meant by "so that users can execute those by keeping the script inside the sudo menu" ?

Member Avatar for thekashyap
0
86
Member Avatar for Im_a_Student

1. You set the umask using umask command. 2. If you want to set "default" umask you add appropriate command (e.g. umask 002) in some initialization script. E.g. .profile or .bashrc etc. 3. Why? Well, in some companies they have VERY strict access controls, they don't want anyone to be …

Member Avatar for thekashyap
0
83
Member Avatar for ssiva

What in the name of thundering blisters you think guys here are for ? Do you work ?!! Post your code if you have a problem.. We're here to "help you do it" not "do it"..

Member Avatar for thekashyap
0
99
Member Avatar for Toktam

With the special divine powers bestowed upon me I can see your makefile and see that on line number 3351 you have an extra comma which is causing this error. Remove it and it should work.

Member Avatar for thekashyap
0
67
Member Avatar for SmileSmita
Member Avatar for thekashyap
0
84
Member Avatar for mankichi

Google it ! Here is the first result.. [url]http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=849851&SiteID=1[/url]

Member Avatar for mankichi
0
98
Member Avatar for Matt Tacular

Just wondering that after #including vector/list etc, why are you using C-style array for this? Use C++ array (i.e. vector) instead, life is so much more easy. [code=cplusplus] #include <iostream> #include <list> #include <iterator> #include <vector> using namespace std; class humanPlayer { public: humanPlayer(string thePlayersName, unsigned int thePlayersTurnNum); ~humanPlayer(){}; void …

Member Avatar for Matt Tacular
0
332
Member Avatar for jaepi

Check out [URL="http://www.daniweb.com/techtalkforums/post332703.html#post332703"]this thread[/URL] also might be helpful for you..

Member Avatar for jaepi
0
171
Member Avatar for rahul_sharma

What happens when you run this query directly from sqlplus? [COLOR=#000000]select loginbean0_.user_name as user1_5_, loginbean0_.user_password as user2_5_, loginbean0_.user_status as user3_5_, loginbean0_.user_role as user4_5_, loginbean0_.user_created_id as user5_5_, loginbean0_.user_created_date as user6_5_, loginbean0_.user_updated_id as user7_5_, loginbean0_.user_updated_date as user8_5_ from user_admin loginbean0_ where loginbean0_.user_name=? and loginbean0_.user_password=?[/COLOR]

Member Avatar for ncton
0
115
Member Avatar for blueskylvr7

Another possibility is to accept input using 3 separate cout+cin, which might be easier for you. Although for sake of learning string parsing basics you should try what AD suggested.. One comment on AD's code: Default values, [U]usually[/U], should be invalid values e.g. Angle(int d = 361, double m = …

Member Avatar for thekashyap
0
97
Member Avatar for kinggarden

[quote=kinggarden;381316]I mean where the compilier starts to compile the project and how it goes through the whole project and turn it to assembly codes. [/quote]Here is an excerpt from one of the old presentations I gave, may that should answer this question: -------------------------------------- The life cycle of a C++ program …

Member Avatar for kinggarden
0
128
Member Avatar for CodeMasterFlex

I don't know if code master flex is around anymore.. :) You've picked up a real old thread.. Have you checked [url]http://en.wikipedia.org/wiki/Binary_tree[/url]

Member Avatar for jwenting
0
228
Member Avatar for sundar divas

google for getrusage, here is [URL="http://man.he.net/man2/getrusage"]one link[/URL].

Member Avatar for vijayan121
0
105
Member Avatar for complete

Another difference is #define doesn't translate any memory allocation, whereas a const variable will cost some memory. There is a third way for constants, use enums. [code]enum { X = 100 } ;[/code] It's comparatively typesafe and doesn't use any memory. Restriction is of course that you can use it …

Member Avatar for vijayan121
0
121
Member Avatar for vicky_dev

Heard of Unix aliases ?! If you don't wanna do that, you can also say x="that whole command" and then $x

Member Avatar for Narue
0
111
Member Avatar for jenymaru08

[URL="http://www.google.com/search?q=C%2B%2B+functions+tutorial"]STFW[/URL] ! Here are the first few links: [url]www.cplusplus.com/doc/[/url][B]tutorial[/B]/[B]functions[/B].html [url]www.cprogramming.com/[/url][B]tutorial[/B]/lesson4.html

Member Avatar for thekashyap
0
92
Member Avatar for squinx22

If you just wanna create file without any contents use the command that is meant for it. :) Use "mkfile", or simply "touch" if you don't wanna complicate things. If you want to write something in the file use redirection. Finally, next time you might wanna use Unix Shell Scripting …

Member Avatar for thekashyap
0
80
Member Avatar for squinx22

AFAIK you can put @ in front of any command. And it'll be supressed. To suppress it's output as well, redirect to /dev/null or a file.

Member Avatar for thekashyap
0
136
Member Avatar for srinath.sec

As already described by AD library calls are calls to functions/APIs exposed /exported by libraries (*.dll+*.lib in windows, *.so and *.a in Unix). System calls are calling basic OS functions/APIs. As most system APIs are provided by OS in form of libraries most system calls are library calls. The library …

Member Avatar for Ancient Dragon
0
100
Member Avatar for jerryseinfeld

What are you tryin to do ? also provide some sample output (also expected output if possible)..

Member Avatar for Salem
0
81
Member Avatar for Savage221

Or in case you've by mistake posted this in C instead of C++ the prototype of interest would be [code]void foo(int& prm1, int& prm2, int& prm3);[/code]

Member Avatar for Savage221
0
84
Member Avatar for sInFuL69er

[quote=joeprogrammer;370115]> [B] Better [/B]yet, instead of using the [] as vector accessors, use std::iterator.[/quote] Probably to learn iterators. But otherwise vector being the C++ array one should use the subscript operator for accessing rather than iterator. It's faster.

Member Avatar for vijayan121
0
106
Member Avatar for pavani2006

[quote=Aia;369552]Just one of many ways of doing it: [/quote] I'm sure your intentions are good but [URL="http://www.daniweb.com/techtalkforums/thread78060.html"]don't post the complete solutions[/URL].

Member Avatar for ~s.o.s~
0
542
Member Avatar for pavani2006
Member Avatar for muzammilpn

It's pretty simple first create a binary tree, then read the input and insert each element in appropriate place in teh tree, then read it back in postfix notation. Let us know once you're done with the code if you need more help.

Member Avatar for iamthwee
0
140
Member Avatar for jaepi

[quote=jaepi;364125]but it's not working...[/quote] Something more than "it's not working" is always more helpful :) A few things I can think of are: - isnan() should be used when you have doubts abt the integrity of the number (you know it's a number already, but may not be represeted correctly …

Member Avatar for thekashyap
0
119
Member Avatar for desijays

Sounds very specific requirement. Donno if some free (of cost) library available for this. May be there is some licensed one.

Member Avatar for desijays
0
134
Member Avatar for Zillian

Reset variable count when you're reusing s and q variables. I.e. do count = 0; as the first thing inside the outer most do-while loop. Problem is because you haven't reset this variable on second attempt you're popping more elements than you pushed. So when you pop on an empty …

Member Avatar for Dani
0
859
Member Avatar for caltiger

Of course.. let the machine do your job. :) Compilers provide options to generate optimized for a given hardware (it optimizes using the full instruction set of that hardware). I have no idea abt the ARM processor you mentioned but check your compiler's manual if it provides any option for …

Member Avatar for Narue
0
191
Member Avatar for NewKidWalking

[quote=Ancient Dragon;363638]remove the "\n"s -- that is only for cout. Not allowed to have literals (text in quotes) on the cin line.[/quote] There is some syntax of cin that allowes us to ignore the \ns.. Isn't it?

Member Avatar for iTaChi
0
133
Member Avatar for ndeniche

True, but I think the msg is put in many places (like [URL="http://www.daniweb.com/techtalkforums/announcement8-2.html"]this [/URL]and [URL="http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies#faq_keep_it_organized"]this[/URL]).. Not that I mind it once more as a sticky thread.. :).. It's one of [B]the[/B] reasons why I came to Daniweb.. Also it works both ways, even ppl who are helping should keep in …

Member Avatar for nkhosinathie
1
288
Member Avatar for jaepi
Member Avatar for srinath.sec

[quote=srinath.sec;363442] 1) how can we change the value of a macro during compilation time tell me with an example [/quote] Undefine the macro and define it again. E.g. [CODE]#undef SOMEONE_ELSE_S_MACRO #define SOMEONE_ELSE_S_MACRO(p1, p2) myfunction_call()[/CODE] Note: 1. assumed that SOMEONE_ELSE_S_MACRO is defined in already in your .c file OR one of …

Member Avatar for thekashyap
0
156

The End.