49,757 Topics

Member Avatar for
Member Avatar for zackie

Hi guys, im new in C++ programming and hope anyone could guide me to understand C++ and be able to code my assignment out :) what the program does: 1. user inputs text file name, 2. user inputs key word 3. program goes about replacing character/strings in the text file …

Member Avatar for iamthwee
0
107
Member Avatar for JungWoo

I got stuck in this program and dont know how to start to phase 2, i finish phase 1 quite good bt i dont understand connection phase 1 and phase 2. so i hope some one can help me pls, thank you very much..... phase 2:Expand Phase 1 to translate …

Member Avatar for iamthwee
0
99
Member Avatar for UmH

hi i'm new in program i want to write code in c .. and i'll convert it to c++ but i've problem this is the code [CODE] #include<stdio.h> #include<conio.h> typedef struct std { int id; char name [10]; char status; }STD; void main() { STD m; printf("Enter id : "); …

Member Avatar for UmH
0
140
Member Avatar for psycoadeq88

we try to develop an interactive program for student to learn c programming.this program requires the following details. (1)-user information such as name and metric number (2)-exercises from functions,arrays,string,structure create minimum 10 objective question for (2). your system should show answer chosen by the user and finally the result and …

Member Avatar for K0ns3rv
0
97
Member Avatar for Nickair

Hi i am looking for a good C compiler for windows vista. I found Visual Studio C++ 2008 express edition, will this work if im writing in c?

Member Avatar for Nickair
0
101
Member Avatar for lotrsimp12345

problem is that it prints out backwards, can't figure out a way to flip it. prolbem is with numbers[siz-1] which begins at last index not first. [CODE] template<class T> T my_vector<T>::show_vector(unsigned int siz) { if(siz==1) { cout<<"enter size of array is 1\n"; return numbers[0]; } else { cout<<"enter this statement"<<endl; …

Member Avatar for lotrsimp12345
0
87
Member Avatar for gauri_phatak_87

hello everyone, I am trying to read the same file twice,but after the first reading it is not taking the value again. what i need to do is read the file once and count the number of lines in the file, then read it again and do further computations...... but …

Member Avatar for kvprajapati
0
176
Member Avatar for elio888

Hi, I have found this code that helps me convert the bearing and distance in to latitude and longitude. Lat/lon given radial and distance A point {lat,lon} is a distance d out on the tc radial from point 1 if: [CODE] lat=asin(sin(lat1)*cos(d)+cos(lat1)*sin(d)*cos(tc)) IF (cos(lat)=0) lon=lon1 // endpoint a pole ELSE …

Member Avatar for kvprajapati
0
105
Member Avatar for jjplaw

I have a protocol package that includes a list of .lib and its .h files that i wish to convert to dll to be used in a C++ environment. The .lib and .h files were developed in C. How do i go about it? I'm using VS 2005. Please advise.

Member Avatar for kvprajapati
0
123
Member Avatar for gretty

Hello I am studying for my exam & I came across this question that is stumping me. [CODE=cplusplus] class X { public: X(); private: int x1, x2; }; class Y : public X { public : Y(); private: int y3; } // the class Y does not end in an …

Member Avatar for kvprajapati
0
4K
Member Avatar for complexcodes

Hello, I am writing a class that can handle large number of digits. I am trying to overload >> operator so that it can store the user input value and if user entered nondigit then it should print an error message and display the default value of 1 ; overload …

Member Avatar for dkalita
0
254
Member Avatar for ehsantl

Hello folks I'm trying to do my assignment and I'm really stuck in! I have to classes..Customer and Pensioner (Customer = Super class and Pensioner = Subclass) The Pensioner has a PensionNo extra than Customer class. I have to make a array of Customer class (for 10) and put Customer …

Member Avatar for rbv
3
297
Member Avatar for wyett

So, I created a program that allows a user to create student, delete student, display all students, search students, and quit. They are labeled 1 - 5, respectively. However, if a user were to enter 1, create the student, be taken back to the main menu and typed in x. …

Member Avatar for wyett
0
185
Member Avatar for Web_Sailor

Hi, I am used to array of hashes in perl. So I was trying to do something like that in c++. Suppose I have created an array and now I want to store multimap in it. How can I do that ? I need to get some clues about this. …

Member Avatar for Web_Sailor
0
166
Member Avatar for IndyColts

Ok, I wanted to learn C++, so I went and found a tutorial. I started reading it, but now I have so many questions! FYI, I have little to no prior programming experience, so please don't laugh at me. 1) What is a compiler, how do I use it, where …

Member Avatar for IndyColts
0
125
Member Avatar for scantraXx-

Hey guys. I'm having trouble getting the largest/smallest value of an element in a set I created from my class. It has to return the largest/smallest element of specific elements that are set to true in my <bool> vector. Example: [code] int set::getLargest() const { if ( !setlist.empty() ) { …

0
75
Member Avatar for no_talents

I have a C program using winsock that connect to internet. however, now I am in Http Proxy environment that need to pass through the proxy before I can connect to internet. my program now is not support this. so Http/1.0 bad request is results. How I can support the …

0
96
Member Avatar for Carrots

Hi, I have been building objects on the stack using the following constructor: [CODE=c++] classname node(arg1, arg2); [/CODE] Which worked fine. But have now learned it is the heap I need to use. So I need to use the [B]new[/B] command I believe, but my syntax is wrong: [CODE=c++] classname …

Member Avatar for Carrots
0
132
Member Avatar for exualS

I'm trying to show a dialog when I press a button, I have made the dialog but I do not know how to access it from the main form code. For example: You can do: this->label1->text = L"Test."; But is there like a form1->label1->text = L"test"; like in basic?

Member Avatar for exualS
0
58
Member Avatar for Ponomous

So i want my program to loop while the user continues to say yes and i figured that my code below would work but for some reason it says that y is an undeclared identifier. [CODE]# include <iostream> # include <fstream> # include <cstdlib> # include <string> # include <cmath> …

Member Avatar for NathanOliver
0
110
Member Avatar for dqddani

Hello. This problem occured in a program that used dynamic memory, and the arrays were deleted and reallocated several times with varying length. It seemed to me that after deleting the arrays, the pointer is still pointing to some data with the same length. (And of course i didn't want …

Member Avatar for jbennet
0
513
Member Avatar for Ponomous

So I am trying to write a program that will give creditcard balance information and it is aparent when I compile that there is some sort of error ( error c2784 ). I think that I might not be including something that I need but I am not sure what …

Member Avatar for Ponomous
0
176
Member Avatar for kayot1k

Hi there, i need to know how to access my elements in a set of integers. i have private data for the following: private: vector <bool> setlist; // indicates set elements as true int cardinality; // number of items in set im creating a function that 'dumps' the elements of …

Member Avatar for kayot1k
0
81
Member Avatar for NICEGUY123

I tried my code below, and i am getting a output of 0. I added lines like cout << p; and cout << alpha to see if the values are getting stored into the variables. My output looks like this -18811398930we are in the loop0 Can anyone help me?? i …

Member Avatar for NICEGUY123
0
228
Member Avatar for Kgunner

Hi, I'm a new member to this website but have always checked it for help when needed and the people here seemed helpful. Anyways, for my data structures class I need to encode and decode data using a huffman tree. What I have so far is a working Huffman tree …

0
42
Member Avatar for Ripture

Hello all, I'm trying to learn how to make just a basic windows app with some buttons and text windows to make the programs I normally create and interface with through DOS a little more interesting. I'm following the tutorials at [url]http://www.winprog.org/tutorial[/url] and [url]http://www.functionx.com/win32/[/url] . I can manage to get …

Member Avatar for Frederick2
0
839
Member Avatar for vs49688

Hey, Does anybody know of a way to generate a random number without using srand(time(NULL)). I need it for a program I'm writing. srand(time(NULL)) is seeding it based on the computer's clock, but it's only accurate to the nearest second, so it's not fast enough. I've had to put Sleep(1000) …

Member Avatar for mrnutty
0
105
Member Avatar for Oritm

Code: [CODE]hWnd = CreateWindow( L"3ngine", L"lars", WS_OVERLAPPEDWINDOW, xPos, yPos, xSize, ySize, NULL, NULL, wc.hInstance, NULL );[/CODE] I want to make L"lars" variable. Searched on google, but i cant find the right answer. Is there a simple solution? thanks!

Member Avatar for Oritm
0
81
Member Avatar for xfngrn13

hello can anybody help me with my code? its about link list with selection sorting by last name i've tried to code this for 3 weeks but until now a can't get it to run please help me thank you in advance here's my code [CODE]void sel_sort() { node *temp, …

0
48
Member Avatar for bigskinny

i can't figure out where to even start with this. You will generate a set of data simulating (unrealistically) peak daily temperatures over a 100-day period. Your program will have the following parts and perform the following operations: (1) Two initially empty array with size 100 and data type "double". …

Member Avatar for redburn
0
115

The End.