15,551 Topics
| |
if i implement same algorithm iteratively and also with recusrion ...than which of the above methods is better in implementing ..... and what are the advantages of recursion over iterative methods ?? | |
I understand most basics but have hit a wall when I come to graphics. I just want to make a 2d game. Any good tutorials out there? | |
can anyone tell me what are pointers to function ??? and how are they implemented ?? | |
Hi. I'm new here. i'm wondering if anyone of you guys have experienced designing an inventory administration program.. the attached pdf file describes the machine problem...please have a look at it... i'm currently doing the code but it's still on the 'menu' selection part. i've been told that i may … | |
this is all that is given: [code] char word[10]; addS("fasten", word); cout << endl << word << endl; // will output fastens [/code] for a program that must make a word plural (add an s) here is my code, which compiles but gives a peculiar "segmentation fault" that I haven't … | |
Hie, I'm trying to get a code in a DLL runned each time a program is launched. 1) I have put this value in the registery key : [code] HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows="D:\myDLL.dll" [/code] 2) [code] BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ , DWORD reason /* Reason this … | |
[code]#include<stdio.h> #include<string.h> #include<conio.h> #define SIZE 21 #define MAX 10 int id[MAX]; int idn[MAX]; char fn[MAX][SIZE]; char ln[MAX][SIZE]; char mi[MAX][SIZE]; int q1; int q2; int q3; float ave; int menu() { int i,s=0; while(s<1|| s>4) { clrscr(); gotoxy(5,5); printf("menu"); gotoxy(5,7); printf("1.insert"); gotoxy(5,9); printf("2.delete"); gotoxy(5,11); printf("3.Display all"); gotoxy(5,13); printf("4.Quit"); gotoxy(5,15); printf("Select(1-4): "); … | |
Hell "o" to all programmers out there. I was just fiddling around with pointers to [inlinecode] const [/inlinecode] when i wrote this snippet. [code] [COLOR=#008000]int main (void) { int* ptr = NULL; const int i = 20; ptr = (int*) &i; *ptr = 40; printf ("\nThe addr of the const … | |
Ask a problem,about template:) i write template class <<<<<<<<<class.h>>>>>>>> #pragma once template <class T> class Tem { public: T rxg(T a); }; <<<<<<<<<class.Cpp>>>>>>>> #include "stdafx.h" #include "class.h" template<class T>T Tem<T>::rxg(T a) { return a; } <<<<<<<<<<<Dialog.Cpp>>>>>>>>> #include "Class.h" ................................ Tem<int> moral; int a=moral.rxg(10); Error: Test.obj : error LNK2019: unresolved external … | |
he is what the home work should be. [COLOR=#000000][B][I]Programming Assignment [/I][/B][/COLOR] [CENTER][CENTER][COLOR=#000000][B]CS 320 - Homework Program #1 [/B][/COLOR] [COLOR=#000000][B][I]Due: Sunday, at the end of Week #2 [/I][/B][/COLOR][/CENTER][/CENTER] [COLOR=#000000]Write a program to compute a student’s tuition for one semester, according to the following specifications. [/COLOR] [COLOR=#000000]A student may be classified as … | |
Hi everyone, I'm *very* new to Linux development, and my question topic is probably pretty obscure, so I thought this was the best place to ask. I need to be able to programattically attach arbitrary binary data to an executable so that the program can access it. In Windows, I … | |
[LIST=1] [*]I need to write a program in c that prompts the user to enter the scores for four quizzes each worth a maximum of 100 points. Your program should compute the average score and display this average together with a letter grade based on the following scale:[/LIST]90 - 100 … | |
can anyone explain me why the values are not swapped in the below code ?? main() { int *i,*j; *i=4000; *j=9000; f(i,j); printf(" %d %d",*i,*j); //output =4000 9000 } void f( int *a, int *b) { int *temp; temp=a; a=b; b=temp; } | |
mvwprintw(main_screen, row, col, "%*.*s", REC_NUM_SIZE + 2, REC_NUM_SIZE + 2, ptr2); The above mvwprintw command is part of the unix curses library but can anyone explain what the "%*.*s" is doing, and is used just for the unix library curses? Regards | |
Thank you for reading my thread,I am new to C and I have a big problem -Naturally.I cant seem to compile thise code: [code] # define EOF =-1 main() { int c,nl; // integers nl = 0; // assignment int ln to 0 value while ((c = getchar() !=EOF) // … | |
Hey there, I'm having a problem with the WAVEFORMATEX format, and setting my primary buffer's format. My code is below: [code] void ErrorBox(string strMessage) { MessageBox(NULL, strMessage.c_str(), "Error", MB_OK | MB_ICONEXCLAMATION); return; } bool DSPlayer::SetPrimaryBuffer() { if (lpDS == NULL) { ErrorBox("Direct sound not initialized."); return false; } ZeroMemory(&dsBufferDesc, sizeof(DSBUFFERDESC)); … | |
Hi all, What is the effficient way to check whether a single linked list is looped somewhere.The number of nodes in the list is not known. In that case traversal of SLL will go into an infinite loop. One solution I have is to store each address of node in … | |
What is a good place to read and grasp the fundamentals of OOP? Does anyone have any suggestions online? | |
[COLOR=#555555][COLOR=#000000]Hello all,[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]I had posted earlier for help, but the post was so deep in an older thread do not think anyone will find it.[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]so here goes,[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]I am in a class to learn C and was tasked with writing a program that … | |
i have an assignment at school where we have to get a string entered by a user and then the program is supposed to encrypt it by adding 13 to A-M and -13 from M-Z so that if i inputted A B C i would get N O P. Basically … | |
Hi All, I've converted the [URL="http://www.daniweb.com/techtalkforums/thread49412.html"]pseudocode from this thread[/URL] into a flowchart, and I'd greatly appreciate if anyone can point out any errors and/or inefficiences in the represented coding. as posted in the above referenced thread, the flowchart represents a solution for a chapter exercise, as follows: "The problem states … | |
[code]#include<stdio.h> #include<conio.h> main() { float x,y,z; clrscr(); printf("\nThis program calculate if you are Underweight,Healthy or Overweight"); printf("\n\n Enter your weight in kilograms:"); scanf("%f",&x); printf("\n\n Enter your weight in meters:"); scanf("%f",&y); z=((y*y)/x); if(z<20){ printf(" the Quetelet-index is: %f",z); printf("\n\n\tUnderweight"); } else{ printf("\n the quetelet-index is : %f",z); printf("\n\n\tOverweight"); } getch(); return … | |
as the title suggest i like to swap two numbers but the thing is that i should not use 3rd variable that is doing the whole stuff only with 2 variables so plz any body help me out | |
I've gone through several books they explain Upcasting as Base class pointer pointing to Drived class Object this definition is correct. Downcasting: [quote]Drived class pointer pointing to base class object..[/quote] i got a bit confused.....not having crystal clear image in my mind..... if the above definition is correct... whats wrong … | |
My C program for making a database which stores data and from which data can be retrieved is stated later.But I am not able to write the function for editing the stored items correctly.Please suggest a method.Also suggest :[B]1.mode in which file is to be opened in case 2 of … | |
double new_amount; printf("enter new_amount:"); scanf("%lf",&new_amount); printf("Amount entered is%lf",new_amount); | |
Hello if i have a file residing on a unix machine, how do i get the stats of the file, ie date stamp of file, and username of file. Best Regards | |
i kow c up to a good level but i have question for which i am anable to find solution that is to find greatest of 2 numbers in 'c' without using 'if' condition can any one help me out | |
Hey Guys, Please help me. I have been trying to code this from the past 2 years. I wish to code the Flat real mode by switching to Protected mode and then switch back to the real mode. I want to do this on a P4 1.8GHz Machine with a … | |
Hi All, The following problem solution has given me fits!!!:mad: The problem states that a library records monthly book withdrawls, capturing the Library of Congress Number, Author and Title, for each month (sorted by the Library of Congress Number for each withdrawl). The initial problem required the merger of the … |
The End.