3,892 Posted Topics
![]() | Re: [quote=dmmckelv;277886]OK next question. I am trying to change the array tokenPtr is pointing to.[/quote] Since you have made the functino parameter as [INLINECODE]char const * const tokenPtr[/INLINECODE] you can neither modify the poniter nor the data pointed by it if thats what you asking. [quote]Also my while loop is only … |
Re: Have you tried reading some [URL="http://www.google.co.in/search?hl=en&q=configuring+outlook+2003&btnG=Search&meta="]google pages..[/URL] | |
I dont know but I get all sort of issues which no one has experienced while browsing Daniweb. Here is a new one which I am attaching right now. It occurs sometimes not frequently, but nonetheless thought would let you know. Hope you can find what is causing such things. | |
Re: [quote=WaltP]These two loops have nothing in common. Change the while loop to look like the for loop.[/quote] Dont you think you are forgetting something in your code -- something like incrementign the index value so as to provide the terminating condition for the loop. [code] while(status !=EOF) { time[index] = … | |
Re: Why would you want to modify a memory loactions value that doesnt belong to you ? It would give you a runtime exception or if not then the bhaviour would be undefined. BTW a workign code which "attempts" to do it and fails at it: [code=c] int main (void) { … | |
Re: Just declare an array of characters. I think 512 should suffice for your purpose. [code=c] char buffer[BUFSIZ] = {'\0'} ; fgets( buffer, BUFSIZ, stdin ) ; // here BUFSIZ is a macro which is defined as 512 [/code] | |
Re: Try putting [INLINECODE]cin.clear( )[/INLINECODE] before the [INLINECODE]cin.ignore( )[/INLINECODE] stmt and see if it works... | |
Re: LOL.. wow man, where did you get hold of this pic. Hey wait...dont tell me its your printer..:D | |
Re: Ah winter for me. Why ? Its so calm, the cold wind blowing, my thoughts drifting.... Ah it is so good.. | |
Hey I was wondering why isnt there a notification by PM policy whenever someone comments or whenever your code snippet is modified. This way it would be easier for me to fix bugs if someone comments on my code saying it doesnt work for so and so condition. Also it … | |
Re: EIther you can put this code in main itself or can pass the variable "round" to the function. It says undefined since the variable "round" is out of scope of the function. | |
Re: Dont know whether you have seen this already, but the matter here looks good. [url]http://linuxgazette.net/issue81/sandeep.html[/url] [url]http://www.linuxjournal.com/article/6210[/url] Hope it helped, bye. | |
Re: [quote=proliant_fan;270357]how do you become a mod? there should be like tryouts, id be interested[/quote] It is basically a popularity contest. The super mod comes up with your name in the MOD forum, other mods voice their thoughts regarding your work and attitude and many other things. If you earn a … | |
Re: [quote=Harshita_garg;276457]Problem with this program is that it creates a temporary matrix C in the function operator+ . This Matrix C calls the destructor before its value can be returned to the matrix, i want to store the result into. Because of this, the program stores random values when matrices are … | |
Re: Only when you want to reply to a post which has quoted some other post, the button gets used. Like: [quote=sos] [quote=Ancient Dragon] I wonder what the button does [/quote] It does exactly what i said right now [/quote] Now try to multi quote my post and it will happen … | |
Re: Please post your code so that we can render our help more effectively. And btw as far as my knowledge goes, arrays are by default passed by reference in C / C++, keeping in mind that passing a huge chunk of data strucutre (array) can result in a greater overhead. … ![]() | |
Re: Damn looks like I am the only one here whose scheme sucks,... [QUOTE] Speed : 150 kbps Duration : 9 PM to 9 AM Charges : $12 pm[/QUOTE] | |
Re: Take for example the "The Best Blogger contest" of Daniweb wherein you get to win loads of stuff as well as a member badge saying you are the best blogger. People like such things a lot and are bound to participate in your forum activities to make a mark. Also … | |
Re: Okay here are a few pointers: 1. Use int main( ) not just main( ) and append a return 0 stmt at the end of main( ). 2. Dont hard code the file names in the function, its not a good practice. Just keep the file name in a constant … | |
Re: Yes I think he exactly means that which are used for spamming everyone's mail boxes. Thread closed. | |
Re: Because this is a code which accepts [search]command line arguments[/search]. You need to run it using a console window by supplying parameters at the command line. If you using windows you can invoke it by opening the command prompt, going to the location where the executable of the program resides … | |
Dont know if anyone else is having this problem but most of the images of Daniweb on my web page are chopped off? | |
Re: Welcome back my friend.My best wishes and reps to you. Hoping to make good friends with you.. Regards, ~s.o.s~ | |
Re: Yes I have played it but have dumped it a long time back. I completed all the campaigns and after that the game started to look boring... Dont think you would get many takers here. Maybe Miss Dani should start a new Lounge for gamers so they can discuss the … | |
Re: Dont you think there is a prob with your for loop. The format is [inlinecode]for( initial conditions or initialize vars; check condition; after_each_loop)[/inlinecode] And what you have written is : [code] for(pos=s.begin(),pos2=s.end()-1,pos!=s.end(),pos2!=s.begin()-1,pos++;pos2--) [/code] You have messed up with the placement of your " ; " To avoid the complexity of … | |
Re: Why not to use EOF see [URL="http://www.gidnetwork.com/b-58.html"]HERE[/URL] | |
Re: Its a bit heavy to grasp on your first attempt but try to read [URL="http://c2.com/cgi/wiki?CompositionInsteadOfInheritance"]this[/URL] and you will know most of which you want to. | |
Re: Ask from the user the number of values that he would want to sum up. Something like: [code=cpp] int max_values = 0 ; cout << "Enter the max values you want: " ; cin >> max_values ; for( i = 0; i < max_values; ++i ) { // do all … | |
Re: [URL="http://en.wikipedia.org/wiki/Wombat"]WOMBAT [/URL] | |
Re: [quote=proliant_fan;274959]i dont like the reuputation system as noone ever gives you any - ive got like 600 odd posts and basically no reputation have you seen the msn q&a beta dani? i think a "best answer" type system woule be good[/quote] It just depends on the forum, and I think … ![]() | |
Re: [quote=Anonymusius;274728]I'm still looking for an legal version of girlfriend 1.0. I can't find an serial for the downloaded once.[/quote] Go download a pirated one.. :mrgreen: ![]() | |
Re: Okay, I am going to ask you why rely on characters if you have strings at your disposal. I havent as such seen the whole code but I think what you are trying to do is to accept the input from the user in string form as abbr and display … | |
![]() | Re: Hey there buddy, welcome to Daniweb and enjoy your stay here. Hoping to see you soon in the C++ forums ;) |
Re: Almost everything related to WinAPI can be found here: [url]http://www.winprog.org/tutorial/[/url] Here you will find the answer to your question in the 9th chapter. Hope it helped, bye. | |
Re: [quote=nanodano;274553]Hey,When you initialize it like that w/o any number, it is either an unknown number, or in most cases, 0. [/quote] Uninitialized is uninitialized, and always holds a junk value with the exception of global variables which are automatically initialized to 0. Sharky, to avoid such subtle bugs *always* initizlize … | |
Re: [quote] Why use Turbo C? Try downloading Dev-C++, Code::Blocks, or if you're into the command line, gcc.[/quote] Agreed. Better move on with the times rather than being left behind. When using Turbo C, beginners keep getting weird ideas about how to clear the screnn, checking for key hits, using the … | |
Re: Hmm.. never ever encountered such a problem, but just to make one thing sure.. Are you right clicking on the project in the project window to your left and selecting "set as active project" to the project which you are working on ? | |
Re: Hmm.. ok I will give you a simple algo, you attempt it and post your code if you get stuck: [LIST] [*]Create a variable character count which counts the non uppercase chars and initialize it to zero.[/LIST][LIST] [*]Create an array of 26 integers and initialize it to zero. This array … | |
Re: A non recursive way, if it suits your need: [url]http://www.daniweb.com/code/snippet533.html[/url] | |
Re: First of all 1. Indent your code properly so that it is easy for us to go through it. 2. Dont use void main( ) , use int main ( ). 3. You have very much accomplished most of the task, but I think the mistake you are doing in … | |
Re: [quote]P7K[/quote] Damn... talk about ripping off [URL="http://www.daniweb.com/techtalkforums/thread60505.html"]someone else's title[/URL] ;) BTW congratulations, Mr. DMR | |
Re: [quote=Barefootsanders;273394]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 original post. It has to be a multi dimensional … | |
Re: This is where your experiece and expertise in the field of Object Oriented practices comes into play and you would be faced with such situations during project development. Normally one liner functions are kept inline since inline functions are pasted at the place of their call and not called like … | |
Re: [quote=WolfPack;273944]By the way, what has shamanism got to do with opening up dead threads. Does a [URL="http://en.wikipedia.org/wiki/Shamanism"]shaman[/URL] bring the dead back to life? [/quote] In Diablo II they sure do :mrgreen: | |
Re: [code] template <[COLOR=Red]typename C[/COLOR], int cnt> struct Definer { static const C d = cnt - 1; Definer<C, cnt-1> f; C const& lookup(int index) { if (index == (cnt - 1)) return d; return f.lookup(index); } }; template <[COLOR=Red]typename[/COLOR] C> struct Definer <C, 0> { static const C d = … | |
Re: [quote=stymiee;273631]That site doesn't seem to work. I keep getting asked to authenticate myself.[/quote] No such thing here, it works fine for me. | |
| |
Re: How about something like: [code=c] int main(void) { char buffer[] = "1941 How Green Was My Valley; John Ford." ; int year = 0 ; char title[BUFSIZ] = { '\0' } ; char director[BUFSIZ] = { '\0' } ; if ( sscanf( buffer, "%d %[^;]; %[^.]", &year, &title, &director ) … | |
Re: YES it is possible. Its pretty simple once you understand the basis: [code] template <class T> class Array { private: T* storage; int size; public: Array(int arg = 10) { storage = new T[arg]; size = arg; } ~Array() { delete[] storage; storage = 0; } T& operator[](const int location) … |
The End.