49,757 Topics

Member Avatar for
Member Avatar for amt_muk

Hello friends, Suppose I have a .doc file (MSWord). Now, how can I read that file using C++ console application, ie, not using MFC or any other visual components. Thanks, Amit

Member Avatar for marco93
0
76
Member Avatar for karang

Hi I have made a program that will change the settings of printer orientation. But I am getting linker error. " [Linker error] undefined reference to `OpenPrinterA@12' " I am not able to find out the reason. Kindly advice Regards Karan Gupta

Member Avatar for Ancient Dragon
0
504
Member Avatar for buddy1

I have a recursive function squares that receives a positive integer n and prints out the first n perfect squares in descending order. Can anyone tell me if this is correct and if not please help. [ICODE]squares(int n) { if( n== 1 ) return 1; else return squares ) n …

Member Avatar for buddy1
0
97
Member Avatar for buddy1

BinarySearch is called on the array below, searching for Value 20. Is the final value of Index 20 in [6]. I think this is right. 2 5 10 15 20 20 20 20 [1] [2] [3] [4] [5] [6] [7] [8]

Member Avatar for buddy1
0
76
Member Avatar for kartik14

Hi, Is there any way to store huge numbers (for example, a number with a million digits) in a C program and be able to perform operations on it ? Thanks..

Member Avatar for ivailosp
0
67
Member Avatar for Hannahlv

Hi, everyone! I thought I posted the code first, it's better. This is the code of the program I've worked with : [CODE] #include "liveMedia.hh" #include "BasicUsageEnvironment.hh" #include <stdio.h> UsageEnvironment* env; Boolean reuseFirstSource = False; Boolean iFramesOnly = False; static void announceStream(RTSPServer* rtspServer, ServerMediaSession* sms, char const* streamName, char* inputFileName); …

Member Avatar for Hannahlv
0
225
Member Avatar for aecsant

How can I achieve in c++, like Foo foo = new Foo.SubFoo(); or Foo foo = new Foo().SubFoo(); Where, Foo : class SubFoo: maybe sub class or independent class, but not method. Note: i Don’t want to use "namespace"

Member Avatar for Prabakar
0
256
Member Avatar for Christian2011

Hi Quick questions abour overload constructors. Lets say I have two overload constructors: [code=c++] class MyFileExtractor{ MyfileExtractor(string); MyfileExtractor(string, int); ~MyfileExtractor(); private: string name; int columns; } /*Class implementation*/ MyFileExtractor::MyFileExtractor(string fname,int c):columns(c) { name=fname; } MyFileExtractor::MyFileExtractor(string fname) { #define STD_NUMBER_OF_COLMS 1 //standard number of columns MyFileExtractor::MyFileExtractor(fname, STD_NUMBER_OF_COLMS); } MyFileExtractor::~MyFileExtractor() { cout …

Member Avatar for Christian2011
0
2K
Member Avatar for Jennifer84

I have started out with tasks that need to communicate between different forms. I need to understand the logic how this works and have problems to find any examples of this. For the 2 codeexamples below, I use these to close the current Form or activate another button on the …

Member Avatar for Jennifer84
0
208
Member Avatar for cam875

Hello, I am having a small problem because I have to have to have it so the user can enter a number and that number is stored in a variable and that variable becomes the name of the file to be created with the extension .asw. It is going to …

Member Avatar for cam875
0
100
Member Avatar for Lukezzz

I have a 2D vector that I have a count on the first dimension and push_back for the second dimension. The vector i have declared like this: [code] std::vector<std::vector<string> > TwoD(1000, std::vector<string>()); [/code] For example say that I have counted the first dimension to 3 and push_backed the second dimension. …

Member Avatar for ArkM
0
206
Member Avatar for xyzt

hello, i want to learn if there's memory leak problem in my code...Let me explain: I have a Customer class,that class also have a destructor function. I have a static function in that class which returns n Customer objects. [CODE] static Customer* createCustomers(int n){ //... } [/CODE] [CODE] int main(int …

Member Avatar for Ancient Dragon
0
131
Member Avatar for Gromnie

my 2nd prog, i intend on adding to it next so that it manipulates the data, see what cool things i can make it do....anyways, just looking for some feedback again on my prog, does it suck :) ? Thx in advance [CODE]#include <iostream> #include <fstream> #include <vector> using namespace …

Member Avatar for Duoas
0
97
Member Avatar for henpecked1

My professor has assigned a lab that we will later be using to learn how to abuse the various types of data structures. In this first lab he asks for the default constructor, a copy constructor, and an overloaded constructor to accept the appropriate data, which you'll see in a …

Member Avatar for Duoas
0
132
Member Avatar for chaoticabyss99

I'm having trouble with an inheritance hierarchy program. I have widdled this program down from a lot of errors to just 1 error. However, I can't seem to figure out how to correct it. Here is the error message I'm receiving: [code]error C2679: binary '<<' : no operator found which …

Member Avatar for chaoticabyss99
0
250
Member Avatar for Shadoninja

I know that to make a simple yes or no question I can do this: [code] int Answer; cin >> Answer; if (Answer == 1) { Response } else { Response } [/code] But in the accounting program (In a recent thread), it registered the key before you hit enter. …

Member Avatar for Shadoninja
0
83
Member Avatar for TheBeast32

Hi, I have been making a program that encrypts files. It works, but it compresses them. It only does it a little bit, but it does. It's weird. Why is it doing this? I have attached a zipped folder with the code, binary, an encrypted file, and the original file. …

Member Avatar for aminit
0
78
Member Avatar for shariff089

hi every one Im still new to programming i have downloaded borland compiler and was writing the following code: [code]#include<iostream> using namespace std; int main() { for (int x = 0; x < 10000000000; x++ ){ cout<< x << endl; }cin.get(); }[/code] the problem is that when it is done …

Member Avatar for VernonDozier
0
113
Member Avatar for Jennifer84

I am writing an interpreter and have come that far that I need to identify or-stataments( || ). Just for fundamental analysis. The code is not a problem. Only the thinking here. My problem is that I am not quite sure how I have to think. I know how it …

Member Avatar for Jennifer84
0
267
Member Avatar for fedderico10

Hey! how is everybody! I need help on my little home project. how do i write a for with no limit of iteration? i need it to stop when a value into the for is reached not when i<=n.

Member Avatar for ArkM
0
100
Member Avatar for Emerald214

I am trying to finish it but there is a problem. The overloaded operator>> doesn’t work in class Circle. Would you please explain to me what wrong thing I did? Thank you so much. [code=C++] #include <iostream> using std::cout; using std::cin; using std::endl; using std::istream; using std::ostream; #include <iomanip> using …

Member Avatar for ArkM
0
177
Member Avatar for 11silversurfer1

Hi I am having great trouble with making my bitmap fit properly on a 1024x768 full screen window. The length is correct but the vertical is too long. I have searched the net and it has said that the size goes up in squares eg 2, 4, 8, 16, 32, …

Member Avatar for 11silversurfer1
0
466
Member Avatar for asad12

i am having a problem in my function, i need someone to explain or fix my problem. and r my arrays correct. [code] #include<iostream> #include<iomanip> using namespace std; void display_draw(int mega[12][6], int draw_index); int main() { //int i; const int NUMROWS=12; const int NUMCOLS=6; int draw_index; int val[NUMROWS][NUMCOLS]={ 5,14,16,39,51,34, 1,20,22,29,41,35, …

Member Avatar for ArkM
0
107
Member Avatar for Dannyo329

Well. I 'm trying to get a program in C++(MS-DOS) to open another .exe file. I thought there might have been a way with the: [CODE]system ("main.exe") ;[/CODE] to call it, but somehow it does not work and its like it skips it completely. I'd appreciate any help. Thankyou. (Sorry …

Member Avatar for Duoas
0
4K
Member Avatar for greyghost86

In the code below i can'f figure out how to get the numbers from my inFile that will be reversed then put into my outFile. I left part of the code unfinished. not sure what I am supposed to put in between >> >>. pretty lost on this one. Im …

Member Avatar for Duoas
0
114
Member Avatar for carlos_lopez_m

Hi everyone! I have a program written in C++ which already exports some data to Excel, on the other hand, I have another program written in VBA to analyse the data. I used to run them independent but now I would like to simplify them. Is there a chance to …

Member Avatar for carlos_lopez_m
0
156
Member Avatar for hiddendragon

u ask user for the filename and then u read the the file, display it into an array assume file contain only numbers with that u display data such as total,average,highest number,lowest ect.. my question is how would u determine the size of an array to work with?? given the …

Member Avatar for hiddendragon
0
142
Member Avatar for Code Shark

Hey. I am wanting to make this program so that the user can move the position of his characters. I have made a attempt but i am confused about some bits. [CODE=C++]// Code Shark #include <iostream> using namespace std; int main() { char character = 'X', movement; do { system("Cls"); …

Member Avatar for VernonDozier
0
148
Member Avatar for Alex Edwards

How in the hell do you divide by 7 using nothing but-- ~, ^, >>, <<, &, | -- In a set algorithm. I'm stumped. I've tried mapping out different numbers dividing by each other... it didn't work. I would map out a number subtracting from the other to see …

Member Avatar for invisal
0
171
Member Avatar for wtf???

how would i write code so when someone enters 1 charcter it changes it to somthing else for example if someone entered 100 / 5 it would say 100 ÷ 5.

Member Avatar for ctrl-alt-del
0
89

The End.