58 Topics

Member Avatar for Asif_NSU

I wrote this code that checks whether a number is prime or not. It returns 1 if the number is prime or 0 otherwise. U just look at the bottom of the code... [CODE]#include<stdio.h> #include<conio.h> #include<assert.h> int is_prime(int n); void main(void) { int n=0; clrscr(); printf("An integer "); scanf("%d",&n); assert(n …

Member Avatar for Djoooleee
1
4K
Member Avatar for Asif_NSU

[QUOTE=Dave Sinkula]You may want to investigate makefiles. Then you can use your favorite editor and still write modular code the correct way.[/QUOTE] I just had a glance at how to write makefiles. Looks messy(will look into that later). So opened Dev C++ instead, and tried to work with projects for …

Member Avatar for Musa_Jutt
0
3K
Member Avatar for Asif_NSU

This is (supposed to be) a soln for a [URL=http://acm.uva.es/p/v1/101.html]ACM problem[/URL] But the program produces a runtime error. Can anyone spot the bug? [CODE] #include<iostream> #include<string> #define MAX 25 using namespace std; void print_blocks(); int return_initial(int a);//return all the blocks //on top of block a to their initial pos int …

Member Avatar for blackcloudbd
0
632
Member Avatar for Asif_NSU

Gaussian elimination is designed to solve systems of linear algebraic equations, [A][X] = [B] This program reads input from a file which is passed as an argument when calling the program. Say the matrix is in file name matrix.txt so we call the program in this way: ------------------------- gauss matrix.txt …

Member Avatar for xNourax
0
1K
Member Avatar for Asif_NSU

Hi there C /C++ experts... I have a confusion regarding the function free(void *) in C and [I]delete[/I] in C++. Suppose there is a pointer named p. In C++, we dynamically allocate memory for p to point at like this [CODE] p = new int [10]. [/CODE],then when we use …

Member Avatar for ahtaniv
0
792
Member Avatar for Asif_NSU

i will be given a set of any length and my program will have to produce the power set. For example: input: c d e output: empty c d e cd de ce cde total number of subsets: 2^3 = 8 I will try to write my own code, but …

Member Avatar for elemes
0
1K
Member Avatar for Asif_NSU

I was trying to do some simple exercises on recursive functions: 1. Write a function using Recursion to print numbers from n to 0. My solution: [CODE]int integer(int n) { if(n>=0) { printf("\n%d",n); integer(--n); } }[/CODE] The next exercise was 2. Write a function using Recursion to print numbers from …

Member Avatar for rexel0924
1
215
Member Avatar for Asif_NSU

i had some experience with 3ds max. But I was so busy for the last 3 months with C++ that now I think i forgot everything. I searched in google for tutorials but there are thousands of them and most importantly disorganised. Now i want to learn fast and only …

Member Avatar for dineshnilanka
0
166
Member Avatar for Asif_NSU

I was looking for an SDK to learn a bit about fingerprint identification system. I have googled a lot and found many different SDKs. However none of them were free. I dont want to implement any commercial system, just want to work with an SDK for educational purpose. Do you …

Member Avatar for devmakwana
1
2K
Member Avatar for Asif_NSU

It's a game where u shoot from a cannon and the cannon-ball moves like a projectile and hits a target. So u will see three major things in this program: 1. Rotating a cannon; 2. How to move an object like a projectile 3. A very simple collision detection Before …

Member Avatar for neelam_209
0
3K
Member Avatar for Asif_NSU

I was trying to get familiar with some digital circuit simulation softwares but i dont know which one to start with. I wanted to know if anyone could advise me a digital simulation software that is used by the professionals in the industry.

Member Avatar for ronjustincase
0
173
Member Avatar for Asif_NSU

I [B]HAD[/B] three partitions of my hard disk - C, D and E. My OS was Win98se. Then My brother installed Red Hat Linux in the E drive. From then everytime the pc started there were options to choose whether to start with win98se or RedHat linux. I could only …

Member Avatar for vigneshvh
0
134
Member Avatar for Asif_NSU

i have this assignment to compute the factorial of an integer of any length. I have done it using array of char and then overloading the * operator accordingly. It works fine but i wanted to know if there were other efficient algorithms for counting factorials of any length. Give …

Member Avatar for roxanne_gem07
0
279
Member Avatar for Asif_NSU

Everyone, have a look at(if u want to) the flash movie in the follwing page: [URL=http://www.newgrounds.com/portal/view/176283]http://www.newgrounds.com/portal/view/176283[/URL] And let me know how u feel... I got some serious issue with this one.

Member Avatar for lasher511
0
128
Member Avatar for Asif_NSU

I have realized that I should start learning some scripting language from now on. So where do I start? Perl, PHP, asp, javascript etc. I mean which language would be better to start with?

Member Avatar for pty
0
221
Member Avatar for Asif_NSU

I dont get it. There's a guy in this forum who had been helping me out a lot, but i just cant add to his reputation bcos of this message "U have to spread ur reputation point before giving it again to *****" Then I added points to two other's …

Member Avatar for WaltP
0
186
Member Avatar for Asif_NSU

The following code finds the square root of a number, it runs fine unless you compile with MinGW gcc: [code] #include<stdio.h> #include<stdlib.h> int main(void) { double x0,x1,a; int i; x1 = 1; x0 = 0; printf("\nFind square root of: "); scanf("%lf",&a); for(i = 0; x0 != x1; ++i) { x0 …

Member Avatar for Asif_NSU
1
1K
Member Avatar for Asif_NSU

I am kind of confused about how DestroyWindow() works. According to the help files this function sends a WM_DESTROY message to the window it has just removed from the screen. In my [inlinecode]WindowProc[/inlinecode] I have something like the following: [CODE] case WM_CLOSE: { DestroyWindow(hwnd); return 0; } case WM_DESTROY: { …

Member Avatar for WolfPack
1
741
Member Avatar for Asif_NSU

I am trying to access files in a folder. The folder name and location will be given - the program will search inside the files in that folder for a specific pattern(yup like grep). However, I am not sure how to actually let my program know what are the files …

Member Avatar for Ancient Dragon
1
263
Member Avatar for Asif_NSU

Hi I am into my Database course. I have proposed to develop a criminal record database as the project. If anyone have worked on such a project before or know a few things about it please do share it with me. Currently I am trying to design the schema for …

Member Avatar for Asif_NSU
0
137
Member Avatar for Asif_NSU

Few days ago I had installed the latest driver for my sound-card (Creative VIBRA 128). From then on my WMP 7.1 is not producing any sound. I can see the videos but there's no sound. But my winamp, DivX player and quicktime are working fine. Then I uninstalled WMP 7.1 …

Member Avatar for DMR
0
312
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 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 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
572
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 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 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 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 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
146
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 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 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 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 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
186
Member Avatar for Asif_NSU

I just moved to windows XP and got myself Visual Studio .NET Professional. I just need Visual C++ .NET and nothing else. The installer gives these options and i dont know which components i need and which i dont. 1. Visual C++ Class & Template Libraries ATL MFC Shared Libraries …

Member Avatar for Asif_NSU
0
152
Member Avatar for Asif_NSU

I want to take integer inputs separated by spaces and terminated by newline character. suppose the user will be inserting integers this way 123 566 789 45 34 8999 341 57 67 and then the user presses enter. so the program will read all the integers when the user presses …

Member Avatar for Asif_NSU
0
163
Member Avatar for Asif_NSU

I need to add a recursive function, called [B]findaverage()[/B] into BST class that takes as input the root of the BST and returns the average of the entire integer items stored in that BST of integers. Plz help me with this function especially without using any static variables.

Member Avatar for Asif_NSU
0
2K
Member Avatar for Asif_NSU

Hi guyz, I am about to start my third semester in my university. I have options to take Data Structures(CSE 225) or Discrete mathmatics(CSE 173). I am not sure which one take to before the other -- I will be doin both though. What do u guyz think. Will taking …

Member Avatar for Asif_NSU
0
1K
Member Avatar for Asif_NSU

I connect to the internet with the follwing settings: proxy: proxy.sparkbd.net port: 8080 my direct internet connection is very slow but connecting through the proxy server makes the connection a lot faster. Now i have installed limewire and i can connect to the network using "no proxy" but the download …

Member Avatar for Asif_NSU
0
323
Member Avatar for Asif_NSU

I have a weird situation. Suppose a string will be entered as an input. using the getchar() function i count the number of characters the string contains until a new line character is encountered. So i know the size of the string. And then i try to allocate enough memory …

Member Avatar for Narue
0
3K
Member Avatar for Asif_NSU

I have to insert a node in a binary search tree. This is what i wrote for the InsertNode() method. But it keeps producing segmentation fault when i run the program. I couldnot find anything wrong in the code. The constructor for TreeNode(int x) sets the item to x, leftchild …

Member Avatar for Asif_NSU
0
81
Member Avatar for Asif_NSU

I had been using old turbo C++ compiler and with i had the help files on C++. However, the documents with my old version of turbo c++ is quite obsolete now. I want to get the latest docs so that i can look up specific function and class details with …

Member Avatar for vegaseat
0
251
Member Avatar for Asif_NSU

1) How many ways can eight people, denoted A,B,.....,H be seated about the square table shown in the following figure where figure (a) and (b) are considered the same but are distinct from figure (c)? [IMG]http://imagesavers.com/040927/1096305491.gif[/IMG] 2) If two of the eight people, say A and B, do not get …

Member Avatar for Asif_NSU
0
97
Member Avatar for Asif_NSU

Hi guys, itz my that projectile game in C which used to be in code snippets sections. Well, as u can see no one was able to compile it and as a consequence it's been thrown out of the snippets :rolleyes: Well, here is the complete program, no codes -- …

Member Avatar for Asif_NSU
0
111
Member Avatar for Asif_NSU

Guys, i m in need of some game sprites. I am trying to make some game using directX. The game is like a space shooter. So i am looking for a nice looking space-fighter with three sprites: one for straight , other two for left and right movement. And i …

Member Avatar for Killer_Typo
0
122
Member Avatar for Asif_NSU

I can read which key is pressed using getch(). For example i can read whether left arrow is pressed or not. But i want know whether both left arrow and up arrow is pressed at the same time or not-- I want to move an object diagonally across the screen …

Member Avatar for gusano79
0
184
Member Avatar for Asif_NSU

In my program i will be taking two inputs, lets say two integers. If the number of input is more than two the program will exit. If it is two then the loop will be executed and after that it will again ask for two new inputs-- and will continue …

Member Avatar for Dave Sinkula
0
95

The End.