49,766 Topics
![]() | |
I'm trying to create a program that takes 2 numbers from a user (a numerator and a denominator), displays one ontop of the other separated by dashes, and then shows the answer of one number divided by the other. Inside an If statement, I want to output several lines using … | |
I got a question about c++ strings. Let's say string text = "0R14" and I access each element using text[0],text[1] etc does text[0] return an integer 0? or a character '0'? if it doesn't return an integer, how do I convert individual string element to integer type if I need … | |
hi... can anyone can tell me the code to animate a trinagle in c language? | |
Hi All. I have created a message box using Win32 API messageBox() function. Now I want to move a button on that message box a little higher. I'm trying to get that by the following code, but when executing the code only the button is moving, leaving its background in … | |
First off, you should know I just started learning C++ today. Anyway, whenever I type in my code to Dev_C++ Compiler, and then try to run it, it always says "Source file not completed." Here's my code: [CODE]// operating with variables #include <iostream> using namespace std; int main () { … | |
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 … | |
#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(); … | |
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 … | |
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 … | |
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. | |
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 … ![]() | |
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 … ![]() | |
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 : "); … | |
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 … | |
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? | |
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; … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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. … | |
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. … | |
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 … | |
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() ) { … | |
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 … | |
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 … | |
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? | |
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> … |
The End.