51,593 Topics

Member Avatar for
Member Avatar for sjcomp

Hello, This is not a c++ question per se, but I do not see a better forum to ask it. I have a binary executable (compiled with Visual Studio C++ 2005) and the source code for this file. I need to change a constant, but for various reason I do …

Member Avatar for William Hemsworth
0
790
Member Avatar for Mr Bin

#include <stack> #include <queue> #include <iostream> #include <fstream> using namespace std; char num[10] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; char ope[4] = {'+', '-', '*', '/'}; bool isope(char); bool isnum(char); int prio(char); queue<char> ReversePolish(); void write(queue<char> ch); void main() { queue<char> q; q = ReversePolish(); …

Member Avatar for VernonDozier
-1
98
Member Avatar for programmingnova

This next practice problem has me implementing functions into code I completed before calculating data about students. I'm getting an error message, and am looking for where my problem(s) are. Objectives of this problem: -Collect data from user: major, last name, credits completed, gpa, tuition paid. -Call a function to …

Member Avatar for dkalita
0
166
Member Avatar for lotrsimp12345

Don't think you can pass any parameter unless you create a point in your main. [CODE] template<class T> void my_list<T>::show_sllist(my_node<T>* p) { if(p!=0) { cout<<p->data; show_sllist(p->next); } } [/CODE] Would i have to create a pointer of type my_node in main to show the list. [CODE] #include <iostream> using namespace …

Member Avatar for dkalita
0
104
Member Avatar for nicholasamh

I am using C++. I use mkdir("C:/test") to create a directory to store my files. I want to hidden the folder that i created. Don't want to let anyone know about this directory/folder at all. Can someone help me out? Thanks alot.

Member Avatar for nicholasamh
0
90
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
110
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
103
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
143
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
98
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
103
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
89
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
178
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
125
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
304
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
300
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
191
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
169
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
126
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
98
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
135
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
113
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
517
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
177
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
86
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
234
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
914
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
108
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
83
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
49
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
120
Member Avatar for NinjaLink

Hey, In my duplicateWords function, I have been trying to figure out for a couple of hours how to [U]create[/U] duplicates for 4 different names in the list. Will someone help lead me in the right direction in how to complete this task? My program is reading in 50 words …

Member Avatar for NinjaLink
1
217
Member Avatar for ayan2587

thanx buddy... that was helpful... well i have one more doubt... the method you gave above is cool if i take input from stream... what if i pass a decimal or hexadecimal integer to a function from my main function..and then have to decide in that function whether the argument …

Member Avatar for ayan2587
0
118
Member Avatar for Chocobo_Knight

Hey all, Not sure if this is a C# or a XML question but i decided to post it here as i'm trying to use C# to update XML. I'm trying to update XML document Attributes from a XLS document. The XML documents are 1000's of lines long and there …

0
56
Member Avatar for kaizen_duck

i want to create a program that can upload my new picture automatically. plez help..

Member Avatar for saphar
0
98
Member Avatar for scantraXx-

Hey guys. I need help on how to set a specific element that I insert into my vector of bool type :S [code] set::set() { cardinality = 0; setlist.resize(DEFAULTSIZE, false); } void set::insert(int x) { if (x >= 0 && x <= DEFAULTSIZE) { setlist.insert(setlist.begin(), 1, x); x = true; …

Member Avatar for dkalita
0
189
Member Avatar for jc101341

I am trying to get my homework assignment to work for class, but I cant seem to get it. Heres the assignment.

Member Avatar for saphar
-1
80
Member Avatar for gtey

I am trying to brush up on C++, which I haven't used in 5 years. I am having problems with the following. Does anyone see the problem in this code? ("sqr(x) is defined in macro.h) #include "stdafx.h" #include "macro.h" #include <iostream> #include <cmath> using namespace std; int main() { float …

Member Avatar for dkalita
0
91
Member Avatar for gtey

am trying to make a timer circuit with the help of 89c52 micro controller. I have one assembly language program, but the programming kit supports only to C language. I want to translate assembly program to C program so that I can use it for the above mentioned micro controller. …

Member Avatar for dkalita
0
183
Member Avatar for Aashath

HI guys I am using STL map in one of my project . I want to limit my size of my STL map size based on the use input , how do i do it . For Example : if the user types in 5 as input then my program …

Member Avatar for dkalita
0
98
Member Avatar for sDanyal

Please download the attachment to run this program OR To download this program paste the following address in browser address bar SNIP This program is written in Dev C++. If you are interested to view it's code then --mail me SNIP Please download this program and tell me by replying …

-1
48
Member Avatar for wyett

So, I am currently having 2 issues with my code. Problem 1: Any value entered in for the GPA that isn't a number causes an infinite loop. (example: enter in the letter X) Instead of giving an error message, it just goes into that infinite loop. [CODE]bool right = false; …

Member Avatar for wyett
0
159
Member Avatar for maddy1985

When the program is given a multicast address it should print the corresponding mac address, along with a list of the 32 overlapped multicast ip addresses. ./ipcalc.pl 224.1.1.1 255.255.255.255 Class D (Multicast) Address: 01-00-5e-01-01-01 Overlapped Addresses 224.1.1.1 224.129.1.1 225.1.1.1 225.129.1.1 226.1.1.1 226.129.1.1 227.1.1.1 227.129.1.1 228.1.1.1 228.129.1.1 229.1.1.1 229.129.1.1 230.1.1.1 230.129.1.1 …

Member Avatar for VernonDozier
0
78
Member Avatar for maddy1985

I need to write a program that parses an ip address and subnet mask and prints out the associated network id and host id. The program should accept the ip address and subnet mask as input parameters, e.g., ipcalc 192.168.1.129 255.255.255.240 The output should display the class of the address, …

Member Avatar for maddy1985
0
848
Member Avatar for nanoooosha

Hello, I have this function void smallAverage(int *array, float *average, int *numSmallerThanAverage ); which returns in the parameters, average and numSmallerThanAvergae, the corresponding result. average is the average value of all the elements of the array. numSmallerThanAverage is the number of elements in the array which are smaller than the …

Member Avatar for Dave Sinkula
0
136
Member Avatar for ramsdellcp

[code=c++] // AY3814 - Chris Ramsdell. Program 1 - Hangman game per guidelines. #include "stdafx.h" #include <time.h> #include <stdlib.h> #include <iomanip> #include <iostream> #include <string> #include <fstream> #include <cmath> #include <stdio.h> #include <cstdlib> #include <sstream> #include <vector> using namespace std; int main(); class Hangman { public: void set_values (string, string, …

Member Avatar for csurfer
-1
151

The End.