49,757 Topics

Member Avatar for
Member Avatar for anbuninja

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. …

Member Avatar for anbuninja
0
113
Member Avatar for daviddoria

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 …

Member Avatar for Salem
0
163
Member Avatar for En1ro

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 …

Member Avatar for En1ro
0
177
Member Avatar for legendofme

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 …

Member Avatar for Narue
0
92
Member Avatar for Jennifer84

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" …

Member Avatar for Jennifer84
0
142
Member Avatar for zidaneqrro

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 …

Member Avatar for William Hemsworth
0
137
Member Avatar for Motvel

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 …

Member Avatar for dmanw100
0
121
Member Avatar for kiwihaha

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 …

Member Avatar for dmanw100
0
114
Member Avatar for Ngup

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) …

Member Avatar for Radical Edward
0
93
Member Avatar for trap-jaw

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.

Member Avatar for Radical Edward
0
44
Member Avatar for CodeBoy101
Member Avatar for zidaneqrro

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 …

Member Avatar for Sky Diploma
0
79
Member Avatar for zidaneqrro

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 …

Member Avatar for osirus0830
0
117
Member Avatar for bamabambhole01

Hii everyone !! Can anyone creat class delta.h for me ! Its about dirac delta function ( for 2d) . a simple one. Looking urgently. Regards,

Member Avatar for bamabambhole01
0
3K
Member Avatar for welles

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 …

Member Avatar for welles
0
95
Member Avatar for blah70

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.

Member Avatar for ithelp
0
92
Member Avatar for pakman31

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 …

Member Avatar for Ancient Dragon
0
6K
Member Avatar for savinki

We have a socket program written in standard c++. Could anyone tell me about what are the test cases i should do?

Member Avatar for Ancient Dragon
0
53
Member Avatar for drajairtt

hi, where i could get the wsock32.lib and ws2_32.lib files. please help me

Member Avatar for Ancient Dragon
0
51
Member Avatar for nemoUSA

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 …

Member Avatar for Ancient Dragon
0
99
Member Avatar for ArNy

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?

Member Avatar for lwxmeme
0
482
Member Avatar for loeto

[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 …

Member Avatar for loeto
0
169
Member Avatar for nurulshidanoni

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]) { …

0
44
Member Avatar for risa

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

0
87
Member Avatar for alkeshtech

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]; …

Member Avatar for Ancient Dragon
0
129
Member Avatar for jimJohnson

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 << …

Member Avatar for Ancient Dragon
0
82
Member Avatar for mussa187

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 …

Member Avatar for mussa187
0
128
Member Avatar for Spagett912

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 …

Member Avatar for Ancient Dragon
0
111
Member Avatar for Spagett912

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 …

Member Avatar for VernonDozier
0
281
Member Avatar for lahom

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]; …

Member Avatar for Ancient Dragon
0
976

The End.