15,551 Topics

Member Avatar for
Member Avatar for avalloc

I am having problems with a program I am writing. Write a program to read 2 integers. Then call a function to add them together and return the result. Display the result from the "main" program. How would I go on doing this?

Member Avatar for avalloc
0
83
Member Avatar for Acidburn

Hello can anyone explain the following bugs: [quote] Book.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CBook::Serialize(class CArchive &)" (?Serialize@CBook@@UAEXAAVCArchive@@@Z) ViewBooks.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CBook::Serialize(class CArchive &)" (?Serialize@CBook@@UAEXAAVCArchive@@@Z) LSMUtility.obj : error LNK2019: unresolved external symbol "public: __thiscall CBook::~CBook(void)" (??1CBook@@QAE@XZ) referenced …

0
46
Member Avatar for regbrz

Heloo! I found codigo well very interesting, but the same it considers that all the processes arrive in instant zero, as I can make to consider arrivals in aleaórios instants. [code]* Scheduling Simulation*/ #include <stdio.h> #include <stdlib.h> /* Process Data Structure */ struct process { int pid; /* Process ID …

0
305
Member Avatar for Acidburn

MFC program seems to always report the following error when I click the 'OK' button to exit the program: Run-Time check failure #2 - stack around the varible 'dlg' was currupted Can anyone explain this? if i click continue, then it just closes and returns me back to my development …

Member Avatar for Ancient Dragon
0
97
Member Avatar for Rass Saee

Does anybody know how member of function can be a pointer to a function. The following example crashes when I call the member that is pointing to a function. [code]#include <stdio.h> #include <stdlib.h> #include <string.h> #include <windows.h> typedef long fooPtr(char *); typedef struct { fooPtr *func; long cnt; } MyStruct; …

Member Avatar for Dave Sinkula
0
122
Member Avatar for BURNEE

I am having a problem implementing the pivot_r portion of the program. I have all of the rest as we have been working on this program for a while but the darn pivot_r portion is killing me. Please any help would be GREAT! [code]/*-------------------------------------------------------------*/ /* Program chapter5_8 */ /* */ …

Member Avatar for Salem
0
204
Member Avatar for jhdobbins

Alright... first off I hate fgets with a passion :) Anyway, I am wanting to read a file into a 2 dimensional array and then randomly select one of those lines to output... What am I missing here? [CODE]void displayQuestion() { /* fp is a FILE pointer. This pointer will …

Member Avatar for Salem
0
3K
Member Avatar for arrogant

can any body help in implementing linked queues and also iterating it from the external main program????:?:

Member Avatar for SpS
0
111
Member Avatar for ghadahelal

i have 2 write a program that read a long number up 2 10 digits. when i made it int , the compiler made error, then i made it double, the program is ok and calculate everthing ok, but when i need 2 print this number again it is correct …

Member Avatar for SpS
0
170
Member Avatar for YoTaMiX

Evening :) I am trying to run a makefile on a program i wrote. in Borland C it runs smoothly . after running the makefile - all sorts of error appear which i do not understand. i am adding the files (program + header + error DOC ) . [B]Makefile …

Member Avatar for Ancient Dragon
0
142
Member Avatar for turkish_girl

my delete operation doesn't work.the element which is added last is being deleted.ı want to delete the one ı want; not the last entered.how can ı do that?can you help me?thank you very much for your consideration... [code]#include <stdio.h> #include <stdlib.h> typedef struct student { char name [25]; int age; …

Member Avatar for dude543
0
153
Member Avatar for YoTaMiX

Hello to you all , Major problem in C , Files included Summary of problem : Program will not copy the feild "name" from struct "univ->std.name" properly. the rest of data is presented fairly. do not touch function "output_university" . Thank you , yotam , Israel .

Member Avatar for YoTaMiX
0
224
Member Avatar for antrea

Need help. What`s wrong? Read words from textfile (only [a-zA_Z]. Puts them to the binary search tree. If word already exists in tree has to add to counter in struct. [code]typedef struct puu_alkio { char sana[100]; int lukumaara; struct puu_alkio *vasen, *oikea; }puu_alkio, *puu_osoitin; void add_to_tree(struct puu_alkio *solmu, struct puu_alkio …

Member Avatar for Salem
0
167
Member Avatar for john_hasan

This program converts a decimal input into a hexadecimal and octal value.But I also want to convert it top binary as well.So kindly guide me. thanx [code]#include<stdio.h> #include<conio.h> void main() { clrscr(); int a; printf("Enter a number"); scanf("%d",&a); printf("Decimal=%d",a); printf("\nOctal=%o",a); printf("\nHexadecimal=%x",a); getch(); }[/code]

Member Avatar for Salem
0
93
Member Avatar for frenzy44

hi i just started programming so im very new to all this, i am writing a code and i am comparing a string in a struct to a string. one of them as you can tell is an array of strings, im not really sure if im breaking any rules …

Member Avatar for Bench
0
196
Member Avatar for jack999

there is a problm in this programmebut i dont know what is itquestionWrite a C-Program that does the following• Read integer numbers from a file inp.dat• Calculate the sum, average, and multiplicand of even numbers and store the result and the even numbers in output file out1.dat• Calculate the sum, …

Member Avatar for Dave Sinkula
0
126
Member Avatar for manjurekha

dear friends, In C, a program i wanna write i.e; from one text file to calculate how many single char exists and print it in one more text file. try this............... i cudn't get.

Member Avatar for kriti
0
103
Member Avatar for kklowanshi

Hi , I m working on Peoplesoft Component Interface. I want to access the [code]class PSApiException { private: tstring m_sMsg; PSI32 m_nMsgSet; PSI32 m_nMsgNum; public: PSApiException(LPCTSTR szMsg = _T("Unspecified PS Api exception"), PSI32 nMsgSet = 0, PSI32 nMsgNum = 0) : m_sMsg(szMsg), m_nMsgSet(nMsgSet), m_nMsgNum(nMsgNum) { } virtual ~PSApiException() { } …

0
63
Member Avatar for turkish_girl

ı am from fatih university from turkey.now according to our country'time zone :03.01 am. and ı am still contınue working but ı couldn't solve the problem for 8 days.and there is a little bit time to handle homeworks.if one of you can help me to do my homework ı will …

Member Avatar for Ancient Dragon
0
100
Member Avatar for degamer106

From what I read in a few books, a static variable retains its value(s) throughout the lifetime of a program. In this stack program I've been trying to fix up, the static var doesn't seem to change or hold its contents after different function calls. I can't figure out what's …

Member Avatar for iamthwee
0
189
Member Avatar for degamer106

I'm kind of confused about how the modulus operator works. Suppose i have x % y with x > y. So if x was 6 and y was 2, then 6 % 2 would produce 0. But i don't really get what happens when x < y :eek: In this …

Member Avatar for degamer106
0
109
Member Avatar for a.baki

hi... Can any one help me about text justification("justification on both sides", or "double justification", where text lines are justified both on the left and on the right. That is, all lines except (usually) the last one have equal width; the method used to achieve that is typically to leave …

Member Avatar for a.baki
0
363
Member Avatar for neeludhiman

Hi friends, Can anyone please tell me how can I set echoing the characters off while I type them on the keyboard ? e.g; I have to input password in c code but that must not be displayed while typing. I am working in Linux. Thanks.

Member Avatar for Salem
0
89
Member Avatar for puppy

Hi, I'm trying to compare elements in two different vectors. I wrote this: if (a[i] = b[j]) same = true; and the compiler said this about the first line: assignment of read-only location What does "assignment of read-only location" mean? Thanks.

Member Avatar for puppy
0
98
Member Avatar for rookieinC++

Hi, I want to display integers 0-99 in randomize order. I can get the list on integers, but can not do in randomize order, I used rand and srand, but it’s not giving me unique numbers. Can anyone help me? -thanks Here is what I did so far… //* This …

Member Avatar for WolfPack
0
112
Member Avatar for shdjsm

I want to display a decimal number in a RichTextBox by using AppendText. How do I convert (if I have to) the decimal number to a string so that the AppendText function will work?

Member Avatar for WolfPack
0
25
Member Avatar for YoTaMiX

Hello to you all , I have a program who i want to copy one input.txt to a output.txt and for some reason it duplicates the string and it doest create a full duplicate . i am over this for a few hours now and i can figure it out. …

Member Avatar for YoTaMiX
0
116
Member Avatar for server_crash

I've got the following code: [code] template <typename T> int Histogram<T>::get_occurances(const T& obj) { map<T,int>::iterator find_occur = frequency.find(obj); if ( find_occur == this->frequency.end() ) { return 0; } return ( find_occur->second ); } [/code] The following line always gives me an error saying ';' expected before find_occur. map<T,int>::iterator find_occur = …

Member Avatar for server_crash
0
141
Member Avatar for chelo77

In this function i am having problems with pointers, syntax wise this would not work ex (fstats +1)++; In this function i use fstats floater array to hold float values, now as in the functions i use fstats[index value]++, now i'm just using pointers how would i do this?? i …

Member Avatar for Ancient Dragon
0
67
Member Avatar for chuckrac

The End.