6,741 Posted Topics

Member Avatar for apegram

[B]>I'm well aware that I need to find greener pastures[/B] Keep in mind that it takes a lot of shit to keep those pastures green. ;)

Member Avatar for geekgoddess
1
242
Member Avatar for krishnchaitu

[B]>please give me the "C" language code for reversing a two dimensional character array.[/B] No, piss off. We don't do homework for lazy students. [B]>Please its very urgent.[/B] I feel no sense of urgency. In fact, I'm quite content with watching you slowly come to the realization that you're going …

Member Avatar for Narue
0
94
Member Avatar for vuki27

[B]>I want to limit the amount of characters used to 10.[/B] Note the difference between limiting the number of characters [i]used[/i] and limiting the number of characters the user can [i]type[/i]. The latter is rarely needed, requires excessive work on your part to simulate shell input, and is guaranteed to …

Member Avatar for Narue
0
5K
Member Avatar for edgias

[QUOTE=edgias;1160674]Hello guys! In my application i have textbox where a student has to enter his/her name.I have validated it so that it accepts only letters but the problem is if i want to delete something when typing i have to use the delete button only.I cant use the space tab …

Member Avatar for ddanbe
0
118
Member Avatar for krishg3

You show us your answers and we'll tell you if they're right. Daniweb is not a homework service.

Member Avatar for Narue
0
98
Member Avatar for deathscythe129

Oddly enough, I answered this very question on [url=http://cboard.cprogramming.com/showthread.php?t=60433]another forum[/url] yesterday. The trick is to convert the expression to postfix so that you can easily evaluate it with a stack based approach. Alternatively, you could build an expression parse tree, but that just adds extra unnecessary steps in most cases.

Member Avatar for trenzkun
0
265
Member Avatar for trippinz

[B]>bump[/B] Well well well, you must be the lord and master of the universe to push all of the other threads down and give yours immediate priority. Did it not occur to you that bumping is rude? How about that those of us who could easily help you right now …

Member Avatar for Geekitygeek
-1
92
Member Avatar for BrianWren

Double the brace up: [code] Console.WriteLine("{0} ... {{", var1); [/code] [URL="http://msdn.microsoft.com/en-us/library/txafckwd.aspx"]MSDN[/URL] clearly states what happens in the format string: [quote] Opening and closing braces are interpreted as starting and ending a format item. Consequently, you must use an escape sequence to display a literal opening brace or closing brace. Specify …

Member Avatar for BrianWren
1
129
Member Avatar for bunnyboy

[B]>the error might be here ...[/B] It might. [B]>new_student->name = (char *)malloc(8 * sizeof(char));[/B] You allocate memory to name, all is well so far (barring minor nits). [B]>new_student->name = "Michael\0";[/B] Bzzt! You've now overwritten your [i]only[/i] reference to the memory just allocated. Not only is this a memory leak, if …

Member Avatar for bunnyboy
0
97
Member Avatar for mikabark

[B]>I want to know what is "Vector for the buckets in hash table".[/B] My assumption would be someone wants you to write a chained hash table using vectors instead of the more traditional linked list. The end result is an array of vectors, where the array index is your hash …

Member Avatar for MyrtleTurtle
0
133
Member Avatar for riahc3

I assume you mean [URL="http://www.eternallyconfuzzled.com/tuts/datastructures/jsw_tut_bst1.aspx"]examples of implementation[/URL].

Member Avatar for Narue
0
52
Member Avatar for Suhas H G

You didn't do any research did you? On top of being pretty freaking easy if you know XSLT or basic XML processing in .NET, a simple search on google gives you complete solutions.

Member Avatar for kvprajapati
0
59
Member Avatar for FlippA

Well, how you do it depends on a few things that you didn't specify, so I'll just throw out one possible solution to get your creative juices flowing: [code] using System; using System.Linq; using System.Globalization; using System.ComponentModel; using System.Collections.Generic; namespace JSW { static class Program { static void Main() { …

Member Avatar for FlippA
0
152
Member Avatar for GAME

[B]>I'm trying to make a button that saves Multiple text >boxes in to 10 lines and 16 characters per line[/B] Be specific about the number and contents of each text box. Are we talking ten text boxes of up to 16 characters? [B]>only found stuff for VB[/B] VB can be …

Member Avatar for apegram
0
163
Member Avatar for tshudyb

[B]>I just can't figure out how it is supposed to be implement >with the extra array element structure in the middle.[/B] It's just an array of linked lists: [code] struct Hotel { std::string name; LinkedList<Attendee> attendees; }; Hotel hotels[5]; [/code] [code] for (int i = 0; i < 5; i++) …

Member Avatar for tshudyb
0
107
Member Avatar for Lebowsk1

[B]>int[] nbrs = new int[balls];[/B] This (line 11) declares a local variable in your constructor that hides the class field. You initialize the local array, but the class field remains null. Change it to this: [code] nbrs = new int[balls]; [/code]

Member Avatar for Narue
0
148
Member Avatar for akssps011

[B]>I am new to compiler construction.[/B] Cool. It's a fun an interesting area. [B]>I wanted to use lex tool.[/B] I strongly recommend writing everything by hand at first. You can use generators when you understand the principles behind the generators and want to work faster. It's much like using a …

Member Avatar for Narue
0
78
Member Avatar for prodam

If you're interested in becoming a Java developer, why does Visual Basic even come into the picture? It's a completely separate langauge. Yes, learning more than one language is a good idea, but I honestly don't understand what your question is or why you're asking it.

Member Avatar for strmstn
0
77
Member Avatar for Soileau

[B]>scanf() is a crappy function that does crappy things to >the program. Get over it and use functions that actually work.[/B] scanf works just fine. The problem is ignorant programmers who don't understand the rationale behind it. Calling scanf crappy after trying to read interactive input is much like calling …

Member Avatar for Dave Sinkula
0
4K
Member Avatar for richman0829

You realize that the >> operator for input is is default delimited on whitespace, right?

Member Avatar for richman0829
0
300
Member Avatar for iamvish

I take it you haven't bothered to read the [URL="http://msdn.microsoft.com/en-us/library/ms683219%28VS.85%29.aspx"]documentation[/URL]?

Member Avatar for Narue
0
71
Member Avatar for avataralien

[url=http://www.eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx]This[/url] and [url=http://www.eternallyconfuzzled.com/tuts/datastructures/jsw_tut_hashtable.aspx]this[/url] should give you enough of the basics.

Member Avatar for Narue
0
69
Member Avatar for donelliewhyte

[B]>fseek() does not work well with text files.[/B] More specifically, random offset access using fseek isn't guaranteed to be meaningful on text files. On a text file, you need to get some position indicators with ftell first, otherwise you're limited to boring stuff like seeking to the beginning of the …

Member Avatar for Ancient Dragon
0
132
Member Avatar for chinmayi

[B]>One of the Advantage of the Pointers is "FAST ACCESS" comparitively to variables[/B] I think you misunderstood whoever told you that. The performance difference of pointers is usually described in terms of array indexing: [code] int a[10] = {0,1,2,3,4,5,6,7,8,9}; int *p; int i; for (i = 0; i < 10; …

Member Avatar for strmstn
0
131
Member Avatar for clutchkiller

I interpret it as the function is supposed to perform input as well as calculate the total. So your main would be something like so: [code] int main() { int n = 10; std::cout<< total(n) <<'\n'; } [/code]

Member Avatar for clutchkiller
0
944
Member Avatar for squarey

PHP's regular expression syntax is based on Perl, right? Boost uses Perl style regular expressions by default, so there shouldn't be a significant difference (at least not one you can't tweak in a few minutes of trial and error).

Member Avatar for Narue
0
82
Member Avatar for mattloto

Array sizes must be constant in C++. If you want to get the size from input, you need to use a container class (such as std::vector), or simulate an array using pointers and dynamic memory.

Member Avatar for Narue
0
125
Member Avatar for squarey

[B]>So whats the difference between the two?[/B] The member operator binds more tightly than the indirection operator, so the net effect of [ICODE]*pmovie.title[/ICODE] is [ICODE]*(pmovie.title)[/ICODE]. To match [ICODE]pmovie->title[/ICODE] you need to force the indirection first with [ICODE](*pmovie).title[/ICODE]

Member Avatar for Fbody
0
152
Member Avatar for Ajantis

[B]>why is he using a[j] = tmp; at line 14??[/B] [ICODE]tmp[/ICODE] is the value being inserted. The loop prior to [ICODE]a[i] = tmp;[/ICODE] is simply a shift to make room for the new value. [B]>Won't it reset the value given by the code in line 13??[/B] No. Step through the …

Member Avatar for Narue
0
71
Member Avatar for DCvonB

[B]>Any suggestions would be greatly appreciated.[/B] I get the impression you want a variable argument list. Something like this: [code] #include <stdio.h> #include <stdarg.h> void foo(int ints, int floats, ...) { int sum_int = 0; double sum_float = 0; va_list args; va_start(args, floats); /* Get the ints first */ while …

Member Avatar for Narue
0
89
Member Avatar for crimsonwave

[B]>Compilers are free to make them any size they want.[/B] Within limits. A long integer in C is absolutely required to be at least 32 bits, so as long as you you can ignore the bits of a larger size, you're solid. C99 introduces the <stdint.h> header where exact-size types …

Member Avatar for Ancient Dragon
0
123
Member Avatar for charqus

[B]>there's a difference ...[/B] Only in your mind. What you described is exactly what sprintf will do for you.

Member Avatar for Salem
0
88
Member Avatar for shriram143

Well, it's pretty freaking easy when you don't have to calculate the binomial coefficients. Just two trivial loops if you don't want leading whitespace and three if you do. [B]>i want code for this.[/B] Then you'd better get started on writing it. [B]>pls giv me the code[/B] No. And saying …

Member Avatar for mjdodd
0
116
Member Avatar for tajendra

[B]>Now let’s check out what will be the disadvantage of _alloca over new/malloc :- >1) One has to be cautious while using alloca for huge blocks. >2) Its scope is limited to a function call. >3) As stack overflow is not a standard C++ exception, one hast to use structured …

Member Avatar for tajendra
0
3K
Member Avatar for easyb

[B]>How can this be simplified for ease of understanding.[/B] Obviously it could be broken down into multiple expressions in sequence rather than one monolithic tongue twister.

Member Avatar for Narue
0
55
Member Avatar for safia qurban

[B]>i want to give a presention on functions use in code[/B] [B]>can any one help me ,as give me these codes?[/B] Wait. You're giving a presentation on something that you don't even know how to do?

Member Avatar for Ancient Dragon
0
274
Member Avatar for parisa_bala

[B]>D.resize(3, temp);[/B] Well that's wrong, and it shouldn't even compile. [ICODE]temp[/ICODE] is an array of double and that particular overload of resize takes a value of type T (that the vector was declared with). Since T is double, it's a type mismatch. [B]>F.resize(3, temp);[/B] This is equally wrong for the …

Member Avatar for Narue
0
203
Member Avatar for MrPapas1991

[B]>when should i use "return 0;" at the end of a main() function?[/B] Always or never, depending on your preference and whether or not you're writing standard C++. In standard C++ 0 is returned automagically when execution falls off the end of main, so the following is perfectly valid: [code] …

Member Avatar for Narue
0
114
Member Avatar for spursfan2110

Assuming variable is of type char, you were close to correct syntax: [ICODE]variable == '\"'[/ICODE]. But because you're comparing against a character, you don't need to escape the double quote, so [ICODE]variable == '"'[/ICODE] works equally well.

Member Avatar for spursfan2110
0
155
Member Avatar for Iam3R

[B]>when i run the program i got the same out put by using memcpy and memmove[/B] There's nothing stopping an implementation from implementing memcpy in terms of memmove. Further, calling memcpy on overlapping memory invokes undefined behavior. It may or may not fail. [B]>what is meant by moving memory and …

Member Avatar for Salem
0
693
Member Avatar for dieter22

[B]>let's call it Array[/B] Let's not. How about you write a small program that fails, and one of us can tell you why. [B]>Can you show me the direction here?[/B] No. Taken in isolation, your code is correct. Post something with more substance if you want help.

Member Avatar for TerishD
0
388
Member Avatar for vijayr_singh

>Huh? Whatcha mean? He means that this question has been spammed on multiple website forums, such as Daniweb, cprogramming, etc...

Member Avatar for siriussam
-1
898
Member Avatar for pratima

>but when i run it it does not do the conversion You don't print the value of ch after the conversion. >#include<iostream.h> This is an old header that is no longer a part of the C++ language. Use <iostream> instead. You also need to consider namespaces, but for now simply …

Member Avatar for Nick Evan
0
2K
Member Avatar for Vitriolics

[B]>What i do not understand is what is going on with/after the second ::[/B] Work it from the inside out. iterator is a member of the vector<int> class, and vector<int> is a member of the std namespace. The idea is implemented as such: [code] namespace std { template <typename T> …

Member Avatar for Narue
0
120
Member Avatar for Stefano Mtangoo

The lexer turns source code into something that's easier to parse. That's really all there is to it. ;)

Member Avatar for Stefano Mtangoo
0
85
Member Avatar for konata_89

[B]>The first question to ask is where do function prototypes belong? Not in main().[/B] Prototypes are not required to be at file scope. It's merely conventional because they usually reside in headers (which are usually placed at file scope) and used in multiple translation units. In the average case, prototypes …

Member Avatar for konata_89
0
129
Member Avatar for Narue

Daniweb has an IRC channel, but how many people know that? How many people use it? Seven? Maybe eight? I think this is a sorely neglected corner of the community.

Member Avatar for Nick Evan
0
281
Member Avatar for Robyy14

[B]>try explaining me what to do or give me a code for example[/B] You could look at any of the open source libraries that do what you want for ideas on how to write your own implementation. [B]>don't redirect me to a site that already made a library for >this …

Member Avatar for dusktreader
0
147
Member Avatar for Eternity[LK]

[B]>// user is not allowed to create arrays with more than 10 symbols[/B] Okay. [B]>cin>>s;[/B] Oops, too late. There's nothing stopping the user from typing more than ten characters. You can check for a string length of ten or less, but by then any damage has already been done. You …

Member Avatar for Eternity[LK]
0
115
Member Avatar for veronica_0501

[B]>Its urgent[/B] For future reference, stating that your problem is urgent will likely be counterproductive. A lot of us are perverse enough to ignore you solely because you're in a rush. Anyway, the immediate problem is your word counting logic isn't a part of the loop. That's not a very …

Member Avatar for gerard4143
0
139

The End.