49,761 Topics

Member Avatar for
Member Avatar for m_meena

Hi, during the build of my code, i m getting the following error error LNK2001: unresolved external symbol __imp__QueryServiceStatusEx@20 i have included the library file advapi32.lib in project --> settings. but still the error is same. any pointers?? TIA

Member Avatar for toko
0
63
Member Avatar for louise07

anybody here who could teach me how..or the function on printing an output file in linked list..

Member Avatar for louise07
0
88
Member Avatar for fundean

Hello, I know that "break" is used to end a loop, but how does one exit a C++ console program, after the user enters a negative value, without using a loop? For example, I would like to do this: if (value == -1) { system("exit");} But the code above does …

Member Avatar for Salem
0
107
Member Avatar for koolboy

[code] int main() { cout << "This Program was written by Nehal Shah\n" << endl; int num, total; cout << "Please enter an integer number:\t\t\t"; cin >> num; while ( num < 0 ) { cout << "\t********************************\n"; cout << "\t********** ERROR *************\n"; cout << "\t********************************\n"; cout << " --------------------------------------\n"; …

Member Avatar for ChaseVoid
0
190
Member Avatar for mylesnezri

How do do you close an external application after previously running it using shell execute in Borland C++ builderr?

Member Avatar for Ancient Dragon
0
20
Member Avatar for someguy88

What im wondering, is because im making a little text adventure game, and i have to write lots of descriptive writing and i would like it all to stay together in a paragraph. But the only way of getting that on output that i know of is to just have …

Member Avatar for someguy88
0
96
Member Avatar for Llama

ok, so I have read some tutorials on file streams, but i am still confused. I have made a program that edits a .txt (inputted by user) file, but my goal is to search an entire file for a string, and every time the string its found, I want it …

Member Avatar for Llama
0
113
Member Avatar for Duki

Hey everyone, I have an assignment to work on and it's a bit confusing. Here's the problem: [quote]Using dynamic arrays, implement a polynomial calss with polynomial additions, subtraction, and multiplication. Discussion: A variable in a polynomial does nothing but act as a placeholder for the coefficients. Hence, the only interesting …

Member Avatar for iamthwee
0
159
Member Avatar for eeneilson
Member Avatar for BadBoy5537

#include <iostream> #include <cmath> using namespace std; int main() { // Declare constants and variables const double ACCURACY = 0.00001; double x, factorial, ex_approx, ex_funct, curr_term; int terms, i; // Read value of x for exp(x) calculation cout << "Enter the value of x you wish to use for exp(x) …

Member Avatar for iamthwee
0
91
Member Avatar for laoballer

hello all, I'm new to c++ and am currently reading the book "C++ how to program" by Deitel. I'm working on exercise 7.15 from his book and am just stuck with the problem. Use a one-dimensional array to solve the following problem. Read in 20 numbers, each of which is …

Member Avatar for Narue
0
116
Member Avatar for someguy88

Please help me im having trouble with a dice roller im making. Its kind of working except i was wondering why it is that every time i start it up it always throws up the same numbers in a row if you put in 100. It probably does that with …

Member Avatar for Narue
1
98
Member Avatar for imonriddilin

for my c++ class we are writing a simon program (the game where you have to remember and follow the pattern given to you). each turn the program outputs either r, b, g or y to the current pattern (output should look like this: turn1: y 2: yg 3:ygy 4:ygyr …

Member Avatar for n.aggel
0
127
Member Avatar for zanaja

I created one Function in VC++(which is COM EXE) which i want to call from my VB code. I am passing Arguements as Variants from VB. In VC++ i filled SafeArray in those Argument.But after returning its showing Empty.. Here is my VB Code Private Sub Form_Load() Dim obj As …

0
55
Member Avatar for cbgreene9185

I'm trying to write a program for my c++ class that takes binary numbers and converts them to decimal. I have programmed this all fine and dandy, but I'm having trouble with my EOF statement. The program requires that I use 3 functions, the first being to prompt user for …

Member Avatar for Ancient Dragon
0
91
Member Avatar for ampdoc

[code=cplusplus] cLass lunch { private: float cost; int calories; public: lunch (); void set cost (float c); void set calories (int c); }; luncn: :lunch () { cost =0.0; calories =0; } void : :lunchdisplay() { cout <<"lunch costs"<<cost<<endl; cout<<"it has"<<calories<<"calories<<"calories"<<endl; } void: :lunch: :setcost (float c) { cost += …

Member Avatar for Ancient Dragon
-1
128
Member Avatar for curt22

I'm working on a simple program. It will compile,but whenever I press the delete button a message pops up and says it needs to close. I looked at the error details and It's error code was 0xc0000005. This is where I think the problem is: [CODE] for(i= 0; i < …

Member Avatar for Ancient Dragon
0
138
Member Avatar for louise07

NEED help please. here's our code. We wanted to print its output file. what function will we use? how will we do it? .We wanted to add printing in the menu.thanks [code] #include<iostream.h> #include<stdlib.h> #include<conio.h> #include<stdio.h> struct node{ int x; char h[50]; //last name char fn[10]; struct node *next; }; …

Member Avatar for louise07
0
116
Member Avatar for curt22

I have a list view and I'm trying to get all of the text out of it. This is my code so far: [CODE] for(i= 0; i < NumOfItems; i++) { char *text = new char[256]; char *text2 = new char[256]; // mask ListView_GetItemText(hWndListView, 0, 0, text, 256); ListView_GetItemText(hWndListView, 0, …

Member Avatar for curt22
0
121
Member Avatar for Necrolis

[code=C++]#include <fstream> #include <iostream> using namespace std; char * buffer; long size; int main () { ifstream infile ("d2gfx.dll",ifstream::in); ofstream outfile ("d2gfx.dll",ofstream::out); infile.seekg(0xBD30,ifstream::beg); size=infile.tellg(); infile.seekg(0xBD30); buffer = new char [size]; infile.read (buffer,size); cout << buffer << "\n"; system("pause"); outfile.seekp(0xBD30,ifstream::beg); size=outfile.tellp(); outfile.seekp(0xBD30); outfile.write ("D2Mad.dll",10); delete[] buffer; outfile.close(); infile.close(); return 0; }[/code] …

Member Avatar for Ancient Dragon
0
88
Member Avatar for n.aggel

I just started learning about stl.... the problem is that 3 cases that i consider "equivelant", don't do the same thing...so the question is, why they are not equivalent? here are the statements: [CODE]cout<<(char)toupper(*pos)<<" "; //this works![/CODE][CODE]cout<<toupper(*pos)<<" "; //without cast it doesn't work, why?[/CODE][CODE]*pos=toupper(*pos); //and this also doesn't work cout<<*pos<<" …

Member Avatar for n.aggel
0
375
Member Avatar for lotsofsloths

I need help with this problem, ok so I am making a program for my brother that randomizes 2 things, a Number(1-6) and a Letter(A-E), I go for the randomize 2 numbers, one for the number, and one for the letter. So i was going very well, until I compile …

Member Avatar for lotsofsloths
0
175
Member Avatar for DemonSpeeding

Okay, so the premise is that this place contains items for sale, and has five of everything that it sells. The inventory is brought in from a file and with parallel arrays you set up the item names with the inventory in stock. I have that all down, but now …

Member Avatar for vmanes
0
110
Member Avatar for dblbac

i have written my homework problem but get 7 errors in it. the errors seem to be comming from this line as well as others like it. any help would be greatly appreciated. this is my first year doing this and is somewhat confusing. I need these lines to be …

Member Avatar for dblbac
0
181
Member Avatar for gator6688

Can someone tell me what i'm doing wrong: [code]#include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { const int MAXGRADES = 5; int i, grade[MAXGRADES]= {0}, count = 0; double Avg, sum = 0; for (i=0; i < MAXGRADES; i++, count++) { cout << …

Member Avatar for Narue
0
153
Member Avatar for robotnixon

Having some trouble with my number guessing game. The object is that the user thinks of a number between 1 and 100 and the computer tries to guess it in a set number of tries. The user inputs an "l" or an "h" if the guess is too low or …

Member Avatar for robotnixon
0
101
Member Avatar for tnvkrishna

i dont understand what the function "flush" does please answer and one more, is there a way that we output a set of data only after a certain while in program execution without storing it in a file and again printing it after reading from that file eg.... i declared …

Member Avatar for vijayan121
0
111
Member Avatar for complete

I am working on a windows XP system. I am doing a command line compile and link using a makefile. It works except for the fact that it cannot find some header files. It has been a long time since I have done this sort of build. I remember that …

Member Avatar for Ancient Dragon
0
73
Member Avatar for indygirl

I am creating a check register for class. We are working on functions - pass by value and pass by reference. I have created all my functions and they seem to be working. However; there is a problem with my currentBal calcuation. When you have an inital transaction the transAmt …

Member Avatar for Ancient Dragon
0
107
Member Avatar for syama.sasi

hi can someone tell me a standard approach 2 solve number pyramids in cpp.some pyramids r easier but what i hav observed is dat every problem requires a different approach.when we r workin on a same environment den why not hav a std approach??

Member Avatar for iamthwee
0
90

The End.