51,593 Topics

Member Avatar for
Member Avatar for billchow24

How can I read integer by ifstream from a file 2 3 -5 9 -6 Besides, how can I read the negative sign also? Thanks everyone!!

Member Avatar for Ancient Dragon
0
56
Member Avatar for KarthikOnIT

Hi, I m trying create a COM Server EXE(C#) from my VC++(dll). The problem is when my dll is in Admin privilege and when i try to do a CreateInstance of my C# EXE it's created with same privilege(admin). I m trying to figure out how to Create my COM …

Member Avatar for Ancient Dragon
0
81
Member Avatar for winrawr

So I got past my last problem using new[], but now I seem to have a new one... I created a char***, var. The goal was to build each dimension of the array to be different sizes at different times, based on separate user input... Here is the code: [code=cpp] …

Member Avatar for Sky Diploma
0
303
Member Avatar for Himerz

Well people... I already know that c++ is not what I want to do in the future, but I do have to pass this class. That said, I need help with this array. I understand how they work, but my instructor wants us to use them in a function!!!!! I …

Member Avatar for Himerz
0
108
Member Avatar for JAGgededgeOB172

Hi, I'm having issues with a program that concept-wise sounds very simple. The program should read in data from a text file (attached a2.txt), and perform stack and queue operations upon the data. The data consists of long math problems, dealing with order-of-operations. The correct output that should be appearing …

Member Avatar for JAGgededgeOB172
0
216
Member Avatar for StandardsDT

I have a few assignments to get done, but I figured I'll post one to see if I'm the right track. If so then what I did will greatly help me. Here are the requirements [quote]Create a simple Dog class that has the following private fields (age (int), gender(char), name(string), …

Member Avatar for StandardsDT
0
152
Member Avatar for kjiu

Hello, I have a problem (error) the error is : [QUOTE]a.c:354: error: ‘hton1’ was not declared in this scope [/QUOTE] and the code is : [url]http://wklej.org/id/52405/[/url] What is wrong ??

Member Avatar for ArkM
0
69
Member Avatar for ajkraft21

I have been giving the task of making a box using all asterisks, given an input of say 5. Im supposed to make something that resembles a 5x5 box with nothing in between... I am stuck at a dead-end here and any help would be appreciated! My code so far …

Member Avatar for winrawr
0
131
Member Avatar for SubProf

Hi Everyone, I have a webBrowser written in c# that displays webpages. I want to add a button to the webBrowser that will increase the size of the text on the webpage when it is clicked. Any help with this will be greatly appreciated. Thanks in advance SubProf

Member Avatar for Ramy Mahrous
0
47
Member Avatar for CPPRULZ

I just have one question, when you have a class that is defined: [code=C++] class box{ public: int *value; box() { value=new int; *value=0; }; box(box &c) {*value=*c.value;}; }; [/code] If in the main you said class box b(a); it would work as expected. But I don't understand how that …

Member Avatar for death_oclock
0
151
Member Avatar for krispygrimace

Ok, I know how to overload an operator. I have successfully overloaded +, -,=, * for a matrix class. I am trying to do inversion of a matrix. I have the code working for the inversion but I do not know how to properly overload the function I want. I …

Member Avatar for nucleon
0
99
Member Avatar for krispygrimace

I have written some code to dynamically allocate memory for a 2D matrix. I am using overload operator to perform functions on the matrix naturally. I am having memory issues (Unhandled exception at 0x... Access violation reading ...). Here is my class, header, and main code. The code builds fine …

Member Avatar for krispygrimace
0
170
Member Avatar for guest7

Hi, I wish to read the file twice. I am using ifstream to read the file. I tried using rewind(File pointer). But i get an error. How can i do it. Thanks

Member Avatar for guest7
0
2K
Member Avatar for dmkp

Hi, I've wondered this for some time now. Say function A() returns a char* which points to a string.. obviously Say function B(char* szString) takes a char* as its argument. If I call B(A()).. is the string automatically deleted or will it create a memory leak? Thanks

Member Avatar for Narue
0
75
Member Avatar for daviddoria

A friend convinced me to store a vector of pointers in my class: [code] vector<Point*> Points; [/code] In my class instead of a vector of "real" objects (what do you call this?). The problem now is that there are several functions (out of my control ie. in a library) that …

Member Avatar for Narue
0
115
Member Avatar for cassie_sanford

I have a title that is read in from the keyboard. I need to put it in quotation marks but i dont know how to do that...for instance, my program asks the user to put in a movie title and they input the title. Then i have to display the …

Member Avatar for Comatose
0
163
Member Avatar for Jayrrus

this is my struct [CODE] struct CropType { string crop; string farmer; string color; string order; }; CropType myCrop; [/CODE] and this is my tree [CODE] struct TreeNode { CropType info; TreeNode* left; TreeNode* right; }; [/CODE] how do i compare a string within my struct like crop to a …

Member Avatar for Jayrrus
0
97
Member Avatar for kartik14

Hi, I'm trying to get [URL="http://www.cgal.org/"]CGAL [/URL]working with VS 2005. So, I installed the [URL="http://www.boost.org/"]Boost [/URL]libraries as well as CGAL and tried to run the following example program: [ICODE]// file: examples/Polygon/Example.C //-----------------------------------------------------------------------// // This is just a simple example that demonstrates how to use the // class CGAL::Polygon_2. //-----------------------------------------------------------------------// #include …

Member Avatar for jencas
0
223
Member Avatar for asweetroxxi

i have to use an array for this and when i run my program my computer starts to spit out number can someone help me. the critia is that it can read from base 2-9 and will give me the answer in base 10. [code] #include <iostream> using namespace std; …

Member Avatar for Freaky_Chris
0
78
Member Avatar for billchow24

I am recently writing a doubly link list by C++ However,I don't know how to perform shuffle as the following: Places all the nodes in odds positions before that in even ones. For example,after executing shuffle, the list {a, b, c, d, e} will become {a, c, e, b, d} …

Member Avatar for Freaky_Chris
0
871
Member Avatar for Jack Wetson

Hi, I have recently jumped into the realms of C# and I am having some trouble with editing properies accross threads. From what i have managed to research thus far i beleive i need to use the Invoke() method, however i am not quite sure how to go about this …

Member Avatar for Jack Wetson
0
168
Member Avatar for Everlong

I need some help with a project. I'm trying to print out all possible combinations of a number grid. For example: 1 3 2 5 4 2 4 3 1 5 5 3 4 2 3 4 3 1 5 2 5 3 4 1 2 The numbers are randomly …

Member Avatar for Everlong
0
227
Member Avatar for cassie_sanford

I am trying to right align my numbers to make them look like this: [TEX] Total Collected: $ 26572.89 Sales: $ 25068.76 County Sales Tax: $ 501.38 State Sales Tax: $ 1002.75 [/TEX] The problem is i dont know how to format it in my code. Here is my code …

Member Avatar for vmanes
0
112
Member Avatar for UGndLord

Hi! This is my first post here :) and I'm not good with english :) I hope that you will understand :) I'm trying to enter a string with only numbers. I solved this but i dont know how to enable delete (backspace button) ? I solve and this problem …

Member Avatar for UGndLord
0
123
Member Avatar for kristjan84

My task is to write a command line program, which has to try and delete a file which is in use. The reason for this is because I am writing a tool which is used for removing malware, and it is very time consuming to have to load up a …

Member Avatar for Comatose
0
82
Member Avatar for mtramnes

I tried to search for other threads to answer my question but couldnt come up with anything that I could think of to describe what I was looking for well. My assignment is this: Write an application that shows the sum of 1 to n for every n from 1 …

Member Avatar for mtramnes
0
153
Member Avatar for daviddoria

I have a function that I call recursively, but I want to keep track of a maximum through the entire process. This is what I am doing: [code] void Intersect(double &MaxDistance) { if(something) MaxDistance = something; Intersect(MaxDistance); } [/code] Is that correct/reasonable? Something doesn't seem to be working and I'm …

Member Avatar for vmanes
0
158
Member Avatar for OrionImprisoned

Game description here:[url]http://www.google.com/url?sa=t&source=web&ct=res&cd=11&url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FBreakthru_(board_game)&ei=dXeTSZH9KJmatwe2i_DiCw&usg=AFQjCNGMFXvDxyuxmi8PrdyGneGpX5SNRA&sig2=pdq6w2j03qSNW-9gQio83g[/url] Variables/functions needed to be known: m_count: turns taken (0,1,2) x,y starting coordinates of a piece h,v destination of said piece get() returns integer 0,1,2 [empty,gold,silver] sideSwitch() resets m_count to 1 and turn to the opposite player. ___ [B]Problem:[/B] First pieces started disappearing: fixed game wasn't ending when …

Member Avatar for OrionImprisoned
0
265
Member Avatar for Himerz

Hi people. I have this code and I am stuck on trying to get a 'call by reference' to work properly. I need to convert Celsius to Fahrenheit and Fahrenheit to Celsius. I am not sure what is wrong with my code. Remember that I have to use a function …

Member Avatar for DemonGal711
0
177
Member Avatar for massivefermion

Hey I want a code for a please wait with dots in front of it (writes some and delete them and starts again) or a / or \ that rounds. thanks

Member Avatar for ArkM
0
138
Member Avatar for h3llpunk

Hi, I tried creating multiple bitmaps on top of each other but cant seem to get the result i want: currently i have one bitmap that is the background and another bitmap that is supposed to be an animal and will be on top of the background. this is my …

Member Avatar for h3llpunk
0
204
Member Avatar for shikhakenue

I have to write a code in Native C++ using which i have to load the contents of an XML into GUI and write back the changes done (pertaining to parameters) into another xml which is a replica of the loaded XML. The usage of TinyXml is a must. Please …

Member Avatar for Salem
0
80
Member Avatar for PaulThomas

Hi, I am a beginner of C#. Currently, I am doing a project of capturing image from a 1394 camera and I used the CMU 1394 camera API to get image from it. As the API is written in C++, is it possible to use in C# by using the …

Member Avatar for ddanbe
0
38
Member Avatar for prateek_one4u

Hi, I am designing a class having interlinked object...a sort of tree. The code for each element of tree looks like : [code] Class C; class Element { public: int key; string payload; C * next; }; [/code] But the object of Element is becoming too heavy because of use …

Member Avatar for StuXYZ
0
88
Member Avatar for tope007

Am a final year student of an institution, i need a computer science based project topic and someone to put me through too. Please help me, is urgent !!!!

Member Avatar for Nick Evan
0
45
Member Avatar for shamila08

Hello! i got this code. However i'm really not familiar with memcpy function. Can anybody can show me the other way to write that code without using memory function? [code=cplusplus] void rightRotate (int k, int n) { char temp [2*MAX], *saveptr; saveptr = num+k; // cout << "k" << k …

Member Avatar for StuXYZ
0
165
Member Avatar for ozan

Hi, I am using Windows Vista as operating system and Microsoft Visual C++ 2008 Express Edition as an compiler. I need a matrix library.Could you suggest me any library that I will easily configurate and link with my compiler. For example I need to take square root of a matrix.Because …

Member Avatar for ArkM
0
166
Member Avatar for Rabia Iqbal

Peace be on all the readers, i want to read a dbx file from Outlook Express in C++ or even in C#. But i dont know how to do this. Can anyone help me please !!!!!!!

Member Avatar for Rabia Iqbal
0
114
Member Avatar for DJPlayer

asked to do something that is I suppose a little strange. maybe because it's out of the blue and never tried it before. Essentially take a .txt file and split it up into 4 files. (no criteria on size, readability etc.. etc. ) Just split it up.. give each a …

Member Avatar for DJPlayer
0
118
Member Avatar for Stefano Mtangoo
Member Avatar for Stefano Mtangoo
0
94
Member Avatar for astropirit

Hello all! I am getting my feet wet at working with ftp. I am working with the WinINet library. This is what i have so far: [CODE=syntax] #include "windows.h" #include <iostream> #include "wininet.h" using namespace std; int main() { const char* apphndl = "ftper"; char* wrkingdr; DWORD buffer[100]; HINTERNET handle,handle2,handle3; …

Member Avatar for nucleon
0
117
Member Avatar for PoZHx

Ok, what i'm wanting to do is read a variables from another process ( not modify it ....just read it and output it) so e.g. test.exe: int main(){ int test = 1; return 0; } how would i write a program to read from the process (test.exe) and check what …

Member Avatar for PoZHx
0
99
Member Avatar for hybrid87

I get this error message while I'm trying to use copy constructor, I understand why the error message is showing but I don't know how to resolve it. #include <iostream> #include <iomanip> #include <fstream> #include <sstream> #include <string> #include <ctime> #include <cmath> #include <vector> #include <cassert> using namespace std; class …

Member Avatar for Freaky_Chris
0
191
Member Avatar for iansane

Hi, I have read about using sprintf and tried it but can't make sense of how it works. I have a double with the value 16.525 . I want to cout only 16.53 I also tried setprecision() and it just cuts off the 5 on the end which won't display …

Member Avatar for vmanes
0
769
Member Avatar for axfv

I'm trying to get info about users in Active Directory using C++. In particular, I'd like to retrieve the EmployeeID property, but it doesn't seem to work. I know for sure one user has a value for the EmployeeID. If I look for FullName or LastLogin, I get the values, …

Member Avatar for axfv
0
180
Member Avatar for En-Motion

I'm trying some code with classes but get these errors: overloaded member function not found in 'Point' 'Point' : no appropriate default constructor available [CODE]#include <iostream> using namespace std; class Point { public: Point(float f_x, float f_y, float f_z); private: float x, y, z; protected: }; Point::Point() { cout << …

Member Avatar for En-Motion
0
1K
Member Avatar for vivekc++

[code=cplusplus] #include<iostream> #include<list> using namespace std; int main() { list<int> dob; for(int i=0;i<5;i++) { dob.push_back(i); } for(int i=0,list<int>::iterator itr=dob.begin();i<3;itr++,i++) cout<<*itr; return 0; } [/code] errors-- test.cpp: In function `int main ()': test.cpp:17: `iterator' specified as declarator-id test.cpp:17: extraneous `int' ignored test.cpp:17: `int list<int, allocator<int> >::iterator' is not a static member …

Member Avatar for Ancient Dragon
0
174
Member Avatar for msalman

Hey everyone, I'm very new to c++ and need some help with overloading operator= for a polynomial class. Here's my relevant code: [CODE] // i can't change the method signature as it is required this way polynomial& polynomial::operator =(const polynomial& rtSide) { this->nullify(); // a method to reset variables polynomial …

Member Avatar for StuXYZ
0
428
Member Avatar for ace_man

As I know Radix sort is ideal for numbers but does radix sort applicable for sorting words also?:S,can you give me small ideas how to do that? :icon_confused:

Member Avatar for Ancient Dragon
0
60
Member Avatar for zgulser

Hi, I have class X and class Y such as the following; [code] class X { ... void foo(); ... } ----------------------------------------------- #include "X.h" class Y { void hoo() { X myNewX; myNewX.foo(); } } int main() { X newX = new X(); } [/code] When I do this, it …

Member Avatar for Ancient Dragon
0
122

The End.