49,761 Topics

Member Avatar for
Member Avatar for collinisaac

ok heres what i got [CODE]Main.cpp System::Void Form1::button1_Click(System::Object^ sender, System::EventArgs^ e) { SetText("Hello, it's working"); } System::Void Form1::SetText(String^ strText) { this->textBox1->Text = strText;[/CODE] form1.h [CODE]private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e); private: System::Void SetText(String^ strText); [/CODE] What if I want to display the results of type double variables or int variables …

Member Avatar for jonsca
0
109
Member Avatar for goldstmarc

Hi, I just want to say i've been searching around this forum and have seen things about GMP and precision arithmetic (which im reading now). However, i've seen nothing to the extreme of a number that I need. This is an *extremely* large number. Before I even get into the …

Member Avatar for NathanOliver
0
191
Member Avatar for Hidden_mistakes

I am wondering why the right hand side of my split screen isn't in the middle and also why the game goes off of the background, any help would be much appreciated [code] #include "SDL.h" #include <stdlib.h> #include <stdio.h> #include <stdlib.h> #include <Windows.h> #pragma comment(lib,"Winmm.lib") /* ---------------------------------------------------------------------- */ /* Defines/Enumerations …

Member Avatar for Hidden_mistakes
0
105
Member Avatar for gregarion

Hey guyy , using getline allows us to read a file line by line. but is it possible to use getline to read individual words in a line? For example. Test.txt My name is John. Using getline will read the entire line... [CODE] int main (){ string templine; ifstream myfile("test.txt"); …

Member Avatar for NathanOliver
0
141
Member Avatar for Dinglish

I am new to programming and i am teaching myself. (my teachers are not very good) I am attempting an old assignment that a colleage had completed in school. He told me it was pretty basic in terms of c++ programming. UELS is a company selling bicycles; Customers may opt …

Member Avatar for NathanOliver
0
114
Member Avatar for mebob

Hey, i was wondering if there was a way to output really large decimals, either to a file or to the output stream? because when i do this: [CODE] file << setiosflags(ios::showpoint) << setiosflags(ios::fixed) << setprecision(50); [/CODE] or do that with cout, the program crashes.

Member Avatar for DinoBA
0
104
Member Avatar for kingnebula

Greetings, I am having an issue with calling both winsock and winsock2 libraries but i can't seem to find where i have called winsock from. I have a main.cpp calling a Socket.h main.cpp contains the following includes: [code] #include "stdafx.h" #include <iostream> #include <vector> #include <windows.h> #include <windowsx.h> #include <string> …

Member Avatar for Ancient Dragon
0
265
Member Avatar for Avatar99

My overloaded operator isn't initializing the value passed through it. Please help!!! and yes I am aware that my insert function isn't complete... [CODE=c]#include <iostream> using namespace std; struct Node{ int value; Node * next; }; class linkedList { public: linkedList () {first=0; length=0;} bool operator > (int a) ; …

Member Avatar for Sky Diploma
0
108
Member Avatar for summey

The code below is for my assignment it works i just want to make sure i did this correct any advice is wanted. Also one thing that is bugging me see basepay well if the base pay is 133.20 it chops off the 0 and only displays 133.2 why iv …

Member Avatar for summey
0
128
Member Avatar for gregarion

Hey guys i need a bit of help in getting my answer correct. Basically , im trying to get my answer to 2 decimal places when i divide one number by another... [CODE]int main(){ int Totalgpa = 46; int e = 13; int SemesterGpa = Totalgpa / e ; cout …

Member Avatar for Avatar99
0
80
Member Avatar for gregarion

Hey guys , i am trying to write an array into a textfile. Here is the coding... [CODE]int main() { ofstream myfile("report.txt"); int g = 0; int billy [] = {16, 2, 77, 40, 12071}; for (int n=0 ; n<5 ; n++ ) { g = billy[n]; myfile << g …

Member Avatar for Fbody
0
108
Member Avatar for samoz83

I'm was wondering if it is possible to be able to import numbers from a file into an array, if the file was set out as: Jan 03 Feb 10 Mar 13 Could you discard the characters and just import the numbers?

Member Avatar for Fbody
0
85
Member Avatar for jessiko555

Hi I've made a program but for some reason I am getting this error that I can't even begin to decipher because it won't point me to where the error has been made. I am using the PV=ZnRT formula. Here is the error: 1>C:\Users\user\Documents\Visual Studio 2008\Projects\lab24jess\Debug\lab24jess.exe : fatal error LNK1120: …

Member Avatar for jessiko555
0
241
Member Avatar for tianxieng

Plesese help: i have no ideas to do with this problem. Write a program which allows the user to input several real numbers and then prints out the 2nd smallest number. The input sequence starts with a positive integer indicating the number of real numbers. For example, for the input …

Member Avatar for Salem
0
147
Member Avatar for Masterslay23

hello guys.. i need your help..can anyone help me to solve my problem... i want to create login password in C++.. please someone help me

Member Avatar for daviddoria
0
51
Member Avatar for smackdown164

so my project is due tomarrow and im stuck i need to some help. This is what i have it came up with some errors and i need to finish it. The conditions are TOTAL BALANCE and need to withdraw only multipule of 20 [CODE]// This is a program that …

Member Avatar for lakarr
0
614
Member Avatar for JwhateverJ

I have this program where I'm trying to find the file size with the boost library. I find the files fine, but it won't get the file's size, where am I wrong? Thanx for your help... Here's my code so far. It compiles fine, but won't return the file size. …

Member Avatar for JwhateverJ
0
4K
Member Avatar for Loranus

Hello for my C++ programming class I am programming a Dictionary program that allows the user to enter in definitions and stores them between 2 classes. Dictionary which will contain all my entries and Entry which will contain the definition for every word that the user inputs. Now when they …

Member Avatar for mattjbond
0
106
Member Avatar for n.utiu

I am working at a project that is supposed to run a python script. Here is my main class: [CODE] #include <iostream> #include "scripting.hpp" int main(void) { cScripter oScripter; std::vector <double> vectMy (7, 32); oScripter.doRunScript (&vectMy, "test.py", "function"); return 0; } [/CODE] And here are respectively scripter.hpp and scripter.cpp : …

Member Avatar for n.utiu
0
148
Member Avatar for nahmartin

I am having problems with sending my array N_List [CODE]int** N_List = create_2d_int_array(len_N_List, 100, "voro:N_List"); double** atoms = create_2d_double_array((int) (8*box_x*box_y*box_z/(lattice*lattice*lattice)), 3, "voro:atoms"); for(i=0;i<len_N_List; i++) for(j=0;j<100;j++) N_List[i][j] = 0; [/CODE] The code runs fine with N_list send and recv omitted but with it, it causes a segmentation fault Send [CODE] if(rank …

Member Avatar for nahmartin
0
465
Member Avatar for manojkv

hi i am new to VC++ ,i want to read a .txt file and parse line by line and interpret the data on windows console ,can any one help me in this regard plz.. thanks in advance

Member Avatar for daviddoria
0
78
Member Avatar for maddav

Hi, Recently (today) got an assignment to take a particular code that we've done previously, and split it into 3 files: 2 .cpp files and a header file. Now, i believe i've done it correctly, but the only thing that's throwing up errors is the use of friend for overloading …

Member Avatar for maddav
0
3K
Member Avatar for FlynnLags

This is quite literally driving me insane. I'm new to C++ so bear with me on this one. Basically, I've got two files. One header file (Package.h) and the C++ file (Package.cpp) I've got a class called [B]Package[/B] and function prototype in the header file as follows [CODE] private: string …

Member Avatar for Fbody
0
796
Member Avatar for Danny_501

Hi all, I have a file called Client.cpp, which has main() contained in it. my problem is at the start of the file: [CODE]#include <iostream> using namespace std; #include "Student.h" enum User { NO_USER = 0, STUDENT = 1, ADMIN = 2}; [/CODE] I get errors on the line with …

Member Avatar for Danny_501
0
124
Member Avatar for FlynnLags

Hey guys, After fixing one of my earlier problems I ran into another one. Basically I'm trying to make an inherited class and add one more parameter to its constructor, but I can't seem to do it properly Here is the masterclass definition [B]Package[/B] [CODE]#ifndef PACKAGE_H #define PACKAGE_H #include <string> …

Member Avatar for FlynnLags
0
202
Member Avatar for godflesh231

If I wanted to access a function that is in a derived class from it's base class, what would be the best way of doing so? I have experimented with functions like [icode]Interact( char *pCommand, char **pArgs )[/icode] which is inside the base class, and can be overidden by the …

Member Avatar for jwenting
0
142
Member Avatar for atticusr5

Ok so I am a total newbie, and for our last programing assignment in my class we are going over Binary Search Trees. Out assignment is to take an older program and make it into a binary search tree. I am using Visual Studio and I have gotten past all …

Member Avatar for mattjbond
0
1K
Member Avatar for gufur

Hi! I just upgraded to win 7 64 bit. I have tryed it both on cygwin compiler and MinGW compiler (toolchain) Working on eclipse. My code works perfect in Linux/ubuntu environment but running in win 7 environment I have the following problem. My last cin does not work. The input …

Member Avatar for gufur
0
392
Member Avatar for loadload

[CODE] using namespace std; int main(int argc, char *argv[]) { int item_weight; // ITEM WEIGHT IN GRAMS double item_unit_price; //ITEM UNIT PRICE ($) int quantity_required; // QUANTITY REQUIRED //ENTER ITEM WEIGHT IN GRAMS----------------------------------------------------- cout << "ENTER ITEM WEIGHT IN GRAMS: "; // prompt for input item_weight cin >> item_weight; // …

Member Avatar for loadload
0
131
Member Avatar for smackdown164

Im have trouble complete on what i have. Looking for some idea's I'm getting a exit error and don't know what to do? Please Help [CODE]// This is a program that is an ATM. #include <iostream> #include <cstdlib> #include <iomanip> using namespace std; void welcome(); void menu(); void amountDeposit (); …

Member Avatar for Nick Evan
1
178

The End.