49,757 Topics
| |
well im writing a program where the user enters a number from 2 to 1000 and it displays the prime numbers. Its in a loop and i want it to stop when the users enters 'n' or 'N' well when i type n or N the program goes crazy haha. … | |
I ran this: [code] cout << "has nan q?" << numeric_limits<int>::has_quiet_NaN << endl; cout << "has nan s?" << numeric_limits<int>::has_signaling_NaN << endl; cout << "has nan q?" << numeric_limits<double>::has_quiet_NaN << endl; cout << "has nan s?" << numeric_limits<double>::has_signaling_NaN << endl; [/code] and I get 0 0 1 1 why would … | |
This code is in Unit1.h [CODE=C++] struct gydytojas { int gydid, amzius, specialyb, telefonas, asmkod; String vardas[25]; String pavarde[35]; String adresas[50]; friend ostream& operator<<(ostream& os, const gydytojas& obj) { return os; }; friend fstream& operator>>(fstream& os, const gydytojas& obj) { return os; }; }; gydytojas gydmas[100]; [/CODE] And this code … | |
I can't seem to figure out whats wrong. This isn't a finished program but it should compile anyways. [ICODE]#include <iostream> #include <string> using namespace std; const string SENTINEL = "\n"; int main () { char letter; int letterCt; cout << "Enter a line of characters" << endl; /* TO BE … | |
I have a textBox that I with help of a Button turning to a Gray BackColor like this. textBox1->BackColor = Color::Gray; Under this textBox I have a checkBox. *(with default "checked").* What I am trying to do here is that when I "uncheck" this checkBox, the textBox will turn "Red" … | |
Last question for today before you start hating me.. I don't know if this really belongs here, but I'll post here anyway. How do I make my programs stay on command prompt longer? Usually they just flash for a second if I don't open them up with command prompt. Heres … | |
Hi! Suppose i have a polygon with 5 points. They are constant. I use "gotoxy()" to define the point positions. Something like this: [ICODE] x1=30; y1=10; gotoxy(x1,y1); cout<<"A"; x2=50; y2=10; gotoxy(x2,y2); cout<<"B"; //.....and so one up five [/ICODE] Now i should to give a another point (X,Y), and calculate with … | |
i want to make a error check on each input. if i only got 1 input.. then i just use while(input==false) so it will continue ask user to input if he wrong input but if i have many input,then the while loop will complicated.. for example: Enter ur gender Enter … | |
Hi I'm using VC++.net 2.0 an creating a few technical indicators for grad school. I am having a problem creating the aroon indicator and I would appreciate some help. Here is a description of what the Aroon Indicator is : Aroon(up) = ((total_num_of_periods - num_of_periods_since_highest_close) / total_num_of_periods) x 100 Aroon(down) … | |
hi, i need a stl list to read a vector. I have a vector "vec" and i want to create a stl list, where i can insert new points to the vector list and remove. | |
How do I convert text in upper case to lower case? :?: | |
Alright, I'm probably going to become the biggest pain in the butt here during the days to come, but please bear with me. [code=Cplusplus] #include <iostream> int Subtract(int first, int second) { std::cout << "In Subtract(), recieved " << first << " and " << second << "\n"; return (first … | |
Hey, I'm using SAMS teach yourself C++ in 21 days, and currently I am on Day 2, however, I've gotten a lot of errors whenever I compile even though I type out the examples exactly as they should be. I'm using Borland C++ Compiler. command line tools or something like … | |
Hii everyone !! Can anyone creat class delta.h for me ! Its about dirac delta function ( for 2d) . a simple one. Looking urgently. Regards, | |
Hello, all, I am pretty new to C++ and I need to write a program for calculating radio propagation path loss based on ray tracing, C++ is used for its faster processing rather than MATLAB. I have a question about passing 2D arrays between functions. One of the files looks … | |
I have an assignment due tomorrow and I've done a bit on it but I dont know how to do the rest. Can anyone help me please. Thanks. | |
Hello, this is my first time posting here so im sorry for doing anything wrong. Also I am kinda new at programming so bare with me. I am currently working on a function that basically reads a list of double values and assigns them to an array. But I ran … | |
We have a socket program written in standard c++. Could anyone tell me about what are the test cases i should do? | |
hi, where i could get the wsock32.lib and ws2_32.lib files. please help me | |
Hello ALL my first post! hope get a quick reply. I am doing a for loop to display a array of strings . my problem is formating and organizing the display . i use cout << and setw() , but the problem is : the names is different lengths is … | |
In visual c++ 2003 to visual c++ 2005 are there any major changes,Are there any Syntax changes i know there has to be,and would the 2005 version be worth the money? | |
[code=cplusplus] #include <iostream> using namespace std; int main( ) { float rand, cent, pounds, shillings; cout << "Enter Pounds " << endl; cin >> pounds; cout << "Enter Shillings " << endl; cin >> shillings; pounds =1; shillings =1; // enter amount while both pounds and shillings is not equal … | |
why the output do not produce the output after sorting....anybody knows how to do a selection sort code? [code=C++] #include <iostream> #include <string> #include <cmath> #include <iomanip> #include <fstream> using namespace std; void selectionSort(int *y,int n)//selection sort function { int i, min,minat ; { for(i=0;i<3;i++) { minat=i; min=y[i]; if(min<y[i]) { … | |
MapFileAndCheckSum returns CHECKSUM_MAPVIEW_FAILURE(Could not map a view of the file) for file of size 758MB and above.For size upto 757MB it returns CHECKSUM_SUCCESS(normal behaviour).What is the meaning of this error?how to solve it?is there any file size limit to calculate checksum..............i want to calculate checksum upto 1.0GB/2.0GB | |
Hey Guys, I want to read from a file. And store the string in a string class array. Number of strings in the file is unknown. How could this be done? [code=C++] int n=0; while(!inFile2.eof()) { string tempStr = getWord(inFile2,n); if(tempStr.length() >=1) { wordCount++; } } inFile2.close(); inFile2.open(inFileName2.c_str()); string wordStr[wordCount]; … | |
I am going over some of my quizzes with questions I did not get right and was wondering if someone could help me w\ a few of them... What will the following code print to the screen: [code=c++] int num[15] = {3,2,8,7,1,5,6}; for (i=0; i <15; i+=3) { cout << … | |
BACKGROUND Your company is writing software for a new networking device and you have the task of managing the DNS storage and retrieval. DNS must translate between an Internet IP address such as 74.125.19.99 and the URI (in this case [url]www.google.com)[/url]. The networking device is not available so the code … | |
Hey everyone I've created this Tic Tac Toe program and it seems to work. I just wanted to know if somebody could check it out and see if there are eny errors in it or changes that i should make. The files to the program can be found below. Thanks … | |
Hey I had notice that my same problem was posted about 6 months ago but remained unsolved so I'm hoping that someone has the answer to my problem. I'm writing a tax program that does the following: For single people, the standard exemption is $4,000; for married people, the standard … | |
hi i used [B]GetModuleFileName[/B] and [B]GetModuleBaseName[/B] functions to return the path(directory) for the folder the project is in and the icon as well ...like this: [CODE]void CForm1::OnCommand1() { // TODO: Add your control notification handler code here CComVariant retval; // - "AutoDim" CString toto="ccc_ext"; CString app_path; CString Icon; char buffer2[2048]; … |
The End.