19,876 Topics

Member Avatar for
Member Avatar for rxgmoral

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 …

Member Avatar for Dave Sinkula
0
264
Member Avatar for mitchelltab

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 …

Member Avatar for ~s.o.s~
0
158
Member Avatar for jobahed

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 …

0
83
Member Avatar for lballans

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 …

Member Avatar for lballans
0
98
Member Avatar for aholliker

[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 …

Member Avatar for ShawnCplus
0
105
Member Avatar for joshilay

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; }

Member Avatar for Salem
0
277
Member Avatar for sgriffiths

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

Member Avatar for Narue
0
89
Member Avatar for Tlhokomelo

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) // …

Member Avatar for Salem
0
103
Member Avatar for Mr Violent

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)); …

0
64
Member Avatar for dilip.mathews

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 …

Member Avatar for dilip.mathews
0
95
Member Avatar for complete

What is a good place to read and grasp the fundamentals of OOP? Does anyone have any suggestions online?

Member Avatar for Dave Sinkula
0
56
Member Avatar for Sealteam56

[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 …

Member Avatar for Sealteam56
0
129
Member Avatar for kraze_101

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 …

Member Avatar for ~s.o.s~
0
195
Member Avatar for madhan

[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 …

Member Avatar for iamthwee
0
119
Member Avatar for aeinstein

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 …

Member Avatar for iamthwee
0
363
Member Avatar for -jOHn BeneDict-

[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 …

Member Avatar for Zababa
0
135
Member Avatar for chillharsh

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

Member Avatar for sukhi
0
480
Member Avatar for Laiq Ahmed

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 …

Member Avatar for Dave Sinkula
0
182
Member Avatar for joydeep1

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 …

Member Avatar for ~s.o.s~
0
110
Member Avatar for rochester

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 …

Member Avatar for iamthwee
0
146
Member Avatar for jatinder kumar

double new_amount; printf("enter new_amount:"); scanf("%lf",&new_amount); printf("Amount entered is%lf",new_amount);

Member Avatar for server_crash
0
91
Member Avatar for sgriffiths

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

Member Avatar for Rashakil Fol
0
86
Member Avatar for chillharsh

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

Member Avatar for dilip.mathews
0
90
Member Avatar for amitkumar2982

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 …

Member Avatar for Dave Sinkula
0
238
Member Avatar for aeinstein

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 …

Member Avatar for iamthwee
0
514
Member Avatar for joshilay

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

Member Avatar for joshilay
0
193
Member Avatar for kakeen

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 = …

Member Avatar for DavidB
0
119
Member Avatar for jitterson
Member Avatar for jitterson
0
104
Member Avatar for joydeep1

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 …

Member Avatar for joydeep1
0
106
Member Avatar for deadprogrammer

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.

Member Avatar for WolfPack
0
167
Member Avatar for rowin

Hi, is there a function to send a mail in C++ Builder? Kind Regards, Rowin

0
51
Member Avatar for tejuarora

[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 …

Member Avatar for alc6379
0
91
Member Avatar for kris.c

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 …

0
73
Member Avatar for sgriffiths

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);

Member Avatar for sgriffiths
0
163
Member Avatar for nileshdalvi

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 …

Member Avatar for dilip.mathews
0
84
Member Avatar for uxohus2b

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. …

Member Avatar for uxohus2b
0
105
Member Avatar for jatinder kumar

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.

Member Avatar for Dani
0
44
Member Avatar for geethanjali_t

hi , need help in solving the flow shop scheduling problem using dynamic programming

Member Avatar for Salem
0
47
Member Avatar for jitterson

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?

Member Avatar for WolfPack
0
83
Member Avatar for dev.cplusplus

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 …

Member Avatar for dev.cplusplus
0
307
Member Avatar for huffstat

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 …

Member Avatar for huffstat
0
115
Member Avatar for bigdill

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!

Member Avatar for jim mcnamara
0
69
Member Avatar for sgriffiths

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() { …

Member Avatar for sgriffiths
0
2K
Member Avatar for Ricky_v.s_C++

How can I separate an integer into digits using for loop? eg. before: 123 after: 1 2 3 anyone can help me with that?

Member Avatar for Ricky_v.s_C++
0
400
Member Avatar for Munoz

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.

Member Avatar for tgreer
0
106
Member Avatar for mrjaiswal

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 …

Member Avatar for spaceboyz87
0
193
Member Avatar for Tester99

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]

Member Avatar for Dave Sinkula
0
53
Member Avatar for squirrel

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 …

Member Avatar for squirrel
0
259
Member Avatar for ~s.o.s~

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 …

Member Avatar for ~s.o.s~
0
121
Member Avatar for molayos

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?

Member Avatar for iamthwee
0
104

The End.