19,876 Topics
![]() | |
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 … | |
Hi All, I'm new to C++ and I have a C++ mortgage assignment due where a user inputs there mortgage amount, interest rate, and term of the loan and the program should give the user there monthly payment and also ask the user if they want to quit or enter … | |
[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 … | |
[COLOR=black]Thank you so much for looking at my question and helping me to get start. I am new to programming. I am currently executing c/c++ programs in VC++ compiler all by my own. I have created very basic programs like displaying the content, find the entered number is odd or … ![]() | |
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 … | |
I was hoping that you could help me with some problems colleagues and I are having with a psychometric tool that we are developing for a short-term project. We were hoping to utilize Visual Basic C++ to get the job done. What we are essentially trying to do, but can't … ![]() | |
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 … ![]() | |
can anyone please tell me why following output is generated ... int i=10; printf(" %d ",i++/i); // output=0 i=10; printf("%d",i/++i); //output=1 i=10; printf("%d ",i++/++i); //output =0 i=10; printf("%d",++i/i); //output=1 | |
Recently, I was assigned a program that needs to be able to do the quadratic equation. I use this code [code] X = ((B*B) - 4*(A*C)); X1 = (sqrt(X)); X2 = 0-X1; X3 = X1/(2*A); X4 = X2/(2*A); Y = (-B + X3); Z = (-B - X3); Y1 = … | |
I have hard time understaning of what is Inheritance? Can someone help on this? | |
I am trying to prepare a database using C,which can store data and from which data can be retrieved and edited. [B]First storing,then retrieving data from the file works.But,during first run of the prog if choice#2(i.e.,DISPLAY)is entered without entering any data using choice#1(although the file contains data),then error occurs,gets hung.A … | |
Hi everyone I am really having trouble right now with oracle for linux. Please tell me how to connect oracle using c/c++ in linux. If anyone knows about any tutorial or have code, please plzzz post me that as well. | |
Hi, is there a function to send a mail in C++ Builder? Kind Regards, Rowin | |
[COLOR=black]Your cell phone provider bills you for minutes consumed per month. The billing rate per minute varies by time of day. The cell phone company rounds usage to the nearest N where N is dependent upon the time of day. Write a C# method based upon the following signature that … | |
I need to use the FFTW to generate fourier transforms. The "fftw-3.1.1 " has been installed already and it is in the location "/compiler/ fftw/fftw-3.1.1"..the "fftw3.h" is in this directory. In my program I have # included the exact path to the ".h" file. Still none of l the FFTW … | |
Hello I am trying to write data to a file. When writing "STEPHEN", only STEP is written, can anyone help? below is my code fp = fopen(filename, "rb+" ); fseek(fp, final_seek_pos, SEEK_SET ); fwrite(update_record, sizeof(update_record),1 ,fp ); fclose(fp); | |
Hey i am outta my wits to get the folowing output in C. Can ne1 help O/p reqd: * * * * * * * * * * * * * * * and so on. see th pyramid is not the desired one when you open this post.go back … | |
Hi, Could someone tell me how I can delete files using a shell script or c++? The condition for deleting files: compare all files (say *.deb files) in folder A to those in folder B. If any file in B is also contained A, then delete the one in B. … | |
Hi,My name is Jatinder Kumar from India(Punjab).I have done B.Tech. in Electronics & Communications Engineering.Iam interested in software programming .I have also interested in hardware. | |
hi , need help in solving the flow shop scheduling problem using dynamic programming | |
What is the difference between “overloading” and “overridding”? This one of my interview questions? I am expecting answers for interview not for assignment any help? | |
Explination: Ever notice how the URLs of search engines and other sites are cluttered with % symbols and other numbers? This is known as URI encoding, which is simply % signs followed by nonalphanumeric characters that have been converted to their hexadecimal values Hi to all, I have the following … | |
I am starting a new project and a couple of tips would be helpful. I wish to read all the files in the Windows Favorites Folder or Directory and extract the link information. I know how to read the files once I have the name of the file. What I … | |
Could anyone tell me the function this program is using? [code]#include <iostream.h> #include <stdlib.h> void My_Name_Is() int main() { My_Name_Is() //Calls function that prints user's name }[/code] Thanks! | |
Hello I am trying to write some data to a certain position in a file, but cannot get it to work I want to write "XX" to position 6 of a specified file, but the data is just being written to the end of file. see below [code]#include<stdlib.h> main() { … | |
How can I separate an integer into digits using for loop? eg. before: 123 after: 1 2 3 anyone can help me with that? | |
I am trying to display a database into textboxes without using Datagrids. How do you give a value to a text box that corresponds with a Sql row. Thanks. | |
Hi All, I am new member of this forum. I am trying to implement the simple c logic for the following problem : I want to come out of a [B]while[/B] loop only when I press the key 'e' But [B]condition is that, it should not wait for me to … | |
Hi All, When I build a solution, it follows error: fatal error LNK1136: invalid or corrupt file [I]If anybody can provide a key how to fix this, please reply[/I] | |
Hi, I have a program which is hard coded, I need to enter a value(n2 in the below code) in the program, and the program processes the file according to the value n2. how I compile now is as follows: cc -o test testprog.c ./test [filename] What I need to … | |
Hello all prorgammers out there. While just fiddling with the pointer concept of mine which is weak i wrote a very simple function to just give the addr of the array to the char type pointer so that i can refer the array using the pointer instead of the array … | |
I have xml strings in a memory in C program. I need to extract the reponse tag. Any known xml parser or string extractor code out there that works? ![]() |
The End.