147 Posted Topics

Member Avatar for freesoft_2000

Hmmm birthdays are good for health, the more you have the longer you live. Read it somewhere...

Member Avatar for Asif_NSU
0
128
Member Avatar for red

Yes, but you can't do them portably. If you are using borland or visual C++ compilers you can try the getch() or getche() function to do that.

Member Avatar for red
0
151
Member Avatar for sahil_logic

[QUOTE]It is never safe, that's why.[/QUOTE] Is it because the user can overflow the buffer by entering more characters than the array or the pointer can hold? If that is the reason then scanf(), cin>> they are also not safe. So why blame gets() only? Or is it because gets() …

Member Avatar for perniciosus
0
408
Member Avatar for Asif_NSU

I've recently swithed from borland C++ 5.5 to MinGW. When I try to compile a .c file using gcc it compiles fine, but when I try to compile a .cpp file using gcc it produces a bunch of errors with c++ specific constructs. If I compile .cpp files with g++ …

Member Avatar for perniciosus
0
188
Member Avatar for Niklas

Try solving acm problems [color=#008000][b]acm[/b].uva.es/[b]problem[/b][b]set[/b]/[/color]

Member Avatar for Niklas
0
112
Member Avatar for sahil_logic

that's because your ans is of type int. Try this instead: [CODE]char ans[/CODE]. In C char literals like 'y' and 'Y' are actually of type int, but in C++ they are of type char. And try to declare your array atleast a size greater than the total no of elements …

Member Avatar for Asif_NSU
0
130
Member Avatar for Quan Chi2

I am not quite sure, but I think geek is used in a negative sense these days(big deal! like no one knows!!). I think I heard something like "Geeks are born, but nerds are made." From the quote it looks like nerd is a class upper than geek. May be …

Member Avatar for chalimac
0
435
Member Avatar for Asif_NSU

Hello guys, It's about time I get a new computer and I thought it better be a laptop this time. I am looking to buy a laptop which will be just as good as any modern desktop pc with all the functionalities. I dont care much about portability and weights, …

Member Avatar for Asif_NSU
0
140
Member Avatar for scoobie

[QUOTE=scoobie]Hi, i am very new to c and was wondering if anybody can help me. i want to create an array of size 1 million bits. i heard you can use malloc or calloc. does anybody know how to do this, thanks in advanced, sc[/QUOTE] Arrays and even calloc and …

Member Avatar for rnodal
0
348
Member Avatar for Asif_NSU

I wanted to explore and know about the GUI toolkits available to be used with C or C++. I heard a bit about Qt, GTK, Mingw etc, and there's MFC too. For the moment I am not quite sure which one to start with. Does a programmer need to know …

Member Avatar for Ancient Dragon
0
573
Member Avatar for SpS

Daniweb looks nicer, but I didnt like the yellow bars, is there no better shades like light green or light red? This is NOT a complain: And I guess almost all the members have been demoted :(. I am a junior poster back again.

Member Avatar for 5starAffiliates
0
2K
Member Avatar for smicer

Big task. Luckily, some people have already done some work. [url]http://www.swox.com/gmp/[/url] If you want to implement on your own, then goodluck. I myself only implemented integers with trivial addition, subtraction and multiplication.

Member Avatar for Lerner
-1
153
Member Avatar for Asif_NSU

Is there any way I can know which company or organisation is hosting a particular domain name or website. For example: suppose I want to know which organisation is hosting [url]www.daniweb.com[/url] (just an example). How do I find out?

Member Avatar for Arabule
0
454
Member Avatar for Asif_NSU

This is probably a stupid question, but i dont get the answer. Plz help me understand. Question: How could a linked list and a hash table be combined to allow someone to run through the list from item to item while still maintaining the ability to access an individual element …

Member Avatar for Narue
0
181
Member Avatar for Asif_NSU

I have taken permission from one of the sites to use their cool flash intro in my personal weblog. They gave me the permission but the only problem is that after the intro is finished it redirects to a page i dont want it to redirect. Seems like the redirection …

Member Avatar for advancescripts
0
192
Member Avatar for Asif_NSU

Eleven parents in the US state of Pennsylvania are taking their local school board to court in an attempt to protect the teaching of evolution. [URL=http://news.bbc.co.uk/2/hi/americas/4282692.stm]BBC News[/URL]

Member Avatar for server_crash
0
642
Member Avatar for server_crash

The war was an unjustified one in the first place. The US policy is not driven by an urge to "HELP other countries" but based on their own interest. This incident is just a fraction of things the US is suffering and will be suffering as a consequence of this …

Member Avatar for bluedos82
0
669
Member Avatar for sunandoghosh

Nice topic :). I might want to do it sometime, just for fun though. I usually write down the topics and sub-topics discussed in the lecture and other subtle points, and then I study on my own. I wonder if the lecturer would be comfortable if he sees your recording …

Member Avatar for Catweazle
0
382
Member Avatar for Decessus

People demand freedom of speech as a compensation for the freedom of thought which they seldom use. ~Soren Kierkegaard

Member Avatar for jwenting
0
209
Member Avatar for Asif_NSU

Hey dudes, I need to know the name of this jars. One of my friends told me they are ziraf jars. I did some amazon and ebay searches but couldnt find anything. I need to know the real name and where they can be found. My uncle got an order …

0
58
Member Avatar for Catweazle

[QUOTE]Bangladesh actually bet Australia buddy.I was an Australian cricket fan but they became too tough to beat,it was rather boring.[/QUOTE] Yup, the whole country celebrated the day Bangladesh beat Australia.

Member Avatar for Asif_NSU
0
214
Member Avatar for TheWebJunkie

Calculus Book (Anton, Bivens, Davis) Digital Design Book(Morris Mano) The C programming Language ( K & R) A Book on C (Al-Kelley, Ira Pohl) Physics Book A pencil Papers An Eraser My legs (counts as two) :P

Member Avatar for JJ___
0
467
Member Avatar for Asif_NSU

[CODE] string s; getline(ifile, s, '\n'); stringstream parser(s); string temp; while(parser>>temp) variables.push_back(temp); getline(ifile, s, '\n'); while(parser>>temp) terminals.push_back(temp);//Doesn't work the second time. [/CODE] stringstream can tokenize the string s only for the first time. The string s is passed to it through the constructor. How can reinitialize the stringstream object?

Member Avatar for Asif_NSU
0
924
Member Avatar for samaru
Member Avatar for cpp noob

I edited your code, good for tc only... [CODE]# include <iostream.h> # include <conio.h> void main() { clrscr(); char address[60]; cout<<"Enter your address"; cin.getline(address,60,'\n'); cout<<"Your address is "<<address; getch(); }[/CODE]

Member Avatar for cpp noob
0
306
Member Avatar for bandm

My learning started with turbo C++ 3.0. Infact, in my uni everyone starts from turbo C, C++. Only later they move to vc++ or dev C++. I think learning TC was just a waste of my time, since it's downright obsolete. You will be learning habits that u must unlearn …

Member Avatar for Narue
0
207
Member Avatar for Asif_NSU

Hi there everyone, Please fill up this questionnaire to help me in my research. It is regarding evolution and religion. I hope to get very good co-operation from you guyz. The questionnaire is [URL=http://www.thesistools.com/webform/index.php?formID=395]Here[/URL] Thank you.

Member Avatar for jwenting
0
2K
Member Avatar for Narue

IMHO separating C from C++ is not necessary. Now I basically visit only C/C++ forum here in daniweb, then I have to visit two separate forums. Although It's not much of a problem, but I prefer C and C++ to be in the same forum. Even though C++ is covers …

Member Avatar for Electrohead
0
609
Member Avatar for tgreer

My first post in Web Development section. You just took the word out of my heart man, I would really love to know how to build a bloggy forum. Me and some of my friends have been using a team blog for a while, but much is still desired.

Member Avatar for CharlesECHO
0
112
Member Avatar for letmec

First you need to have the right compiler(Old Turbo C++ 3.0?) for the code to compile.

Member Avatar for Asif_NSU
0
123
Member Avatar for Asif_NSU

Can anyone tell me if there's any standard package for C++ to work with regular expression, or I will have to get some third-party package?

Member Avatar for Dogtree
0
147
Member Avatar for cblue

Just showing you how to extract digits one by one from an int [CODE] #include<stdio.h> int main() { unsigned input, temp; printf("\nEnter int: "); scanf("%u",&input); temp = input; do { printf("%i\n",(temp % 10)); }while((temp = temp/10) > 0); }[/CODE] And how to combine the digits stored in a string into …

Member Avatar for Narue
0
197
Member Avatar for hasan2003
Member Avatar for Asif_NSU

I have a template linked list class, eg: [CODE]LinkedList<int> list1; LinkedList<implicant> list_imp;[/CODE] Now I need a Linked List of Linked Lists, This is how I declared [CODE]LinkedList<LinkedList<implicant> > list_of_lists;[/CODE] Then I declared a Linked List of implicant class. [CODE]LinkedList<implicant> implicants_list;[/CODE] I calculated some value and put them in the implicants_list. …

Member Avatar for Narue
0
144
Member Avatar for JoBe

[QUOTE]Write a function wich can be declarered as the following: unsigned int datecode(int year, int month, int day); The task of this function is to encode the given date into the 16 bits(the 16 right bits) of the unsigned int and deliver that as a function value. From left to …

Member Avatar for Narue
0
403
Member Avatar for JoBe

My experience in the world of programming is very short. However, I think every recursive function can be transformed into an iterative version. But often recursive functions are easily understood(not for all though :D) and makes the code shorter. So unless you worry too much (and I mean too much) …

Member Avatar for JoBe
0
185
Member Avatar for OurNation

I mainly use a fastmail.fm account, they dont have any adds. The storage is only 10 mb, which is not much but is enough for me. One thing i like about gmail is its auto forwarding service, no other free email service lets you do that.

Member Avatar for techied
0
360
Member Avatar for Asif_NSU

I want to make a program that will start off by opening a text file(blank). The user will put an expression in the file and as he hits the enter(enters a newline character) the result will be shown in the next line of the same open file. Itz almost like …

Member Avatar for Narue
1
259
Member Avatar for bluedos82

I experienced CRC errors a number of times too. I heard that it's a kind of algorithm that checks whether the data read from a media is actually read correctly or not(i.e if there is any missing bits). I saw this error message while copying files from floppy disks. But …

Member Avatar for Mr Wilson
0
628
Member Avatar for Asif_NSU

I have to write a program where the input is a Boolean Expression and the ouput is the corresponding sum of minterms for that particular expression. My idea is that i need to convert the infix boolean expression to a postfix expression. From there I need to construct the truth-table …

Member Avatar for Asif_NSU
0
751
Member Avatar for ohnbabygal

Hey I have this question about header files. Suppose i have myclass.h where the class structure is defined. And then I have a myclass.cpp where methods are defined. The myclass.cpp includes the myclass.h file. Now say i need to use the myclass in another file. Should I include myclass.h or …

Member Avatar for Dave Sinkula
0
112
Member Avatar for Asif_NSU

After having us write codes to convert decimal numbers to another base my faculty has now asked me to write codes to convert a number from ANY base to another. He explains that itz simple since i already wrote the program to convert integer to another base. So i just …

Member Avatar for Asif_NSU
0
208
Member Avatar for chound

[QUOTE=chound]Just to attract your attention. :cheesy: :lol: :cool: ;) Here's the problem: I have this string "flames". Then I get a number from earlier part of myprogram. Let the number be 4. Now 'm' is the 4th character. This should be removed. Then the remaining string is "flaes". Now 'e …

Member Avatar for Narue
0
210
Member Avatar for seeplusplus

[QUOTE=prog-bman]You don't define your function in headers because headers don't get compiled. Make a seperate file for your rational or define them in your main file(I wouldn't do this).[/QUOTE] What are you talking about? U can define functions in headers if u want to. Now if it's a good practice …

Member Avatar for Tripoli178
0
106
Member Avatar for seeplusplus

There is no need to be so harsh on intel, he is just starting out. He should have his freedom of speech and all these hostile responses wont make that easy.

Member Avatar for Narue
0
173
Member Avatar for fopah

Ha ha! There are so many ways to do it. The easiest process is to try divide the number with every number less than (or half of it) and see if it has the remainder 0. If it does then check if the number u r dividing with is a …

Member Avatar for Asif_NSU
0
352
Member Avatar for compeat

[QUOTE=Narue]>but why this sample program doesn't work??!! Integer literals are just that, integers. If you want a long literal, suffix it with L. If you want an unsigned long literal, suffix it with UL. [/QUOTE] if the integer cannot be held in int then the compiler will automatically make it …

Member Avatar for Dave Sinkula
0
563
Member Avatar for Asif_NSU

I have written this program to convert a decimal number to a number of any base. The resulting number has been put into an array and so can be of any size. But the decimal number that i take as input is limited by the range of int. What i …

Member Avatar for Asif_NSU
0
187
Member Avatar for freesoft_2000

C++ out, java in???????????? I see Bjarne Stroustrup(hope i get the spelling correct) burning in jeolousy.:p But, it's actually hard to believe...;) And I would like to add something from Stroustrup's website too....about c++ emerging with its new look... [QUOTE] [b]What will C++0x look like?[/b] I don't know. C++0x will …

Member Avatar for alc6379
2
2K

The End.