49,761 Topics

Member Avatar for
Member Avatar for TylerTCF

I have commented the problem into the code below. See the Store2 vector in the Write Data function. I get error 0xC0000005: Access Violation with no warnings. Any help figuring out why would be appreciated. [ICODE] #include <iostream> #include <fstream> #include <string> #include <sstream> #include <vector> #include <stdlib.h> using namespace …

Member Avatar for mitrmkar
0
130
Member Avatar for Spartan552

Hi guys ! This has been killing me for 8 hours Things work well I'm compiling this way : [QUOTE] g++ -Wall -o prog prog.cpp -L/usr/local/sesam/lib -Wl,-rpath /usr/local/sesam/lib -Wl,-rpath,/usr/sesam/lib -ldl -lc[/QUOTE] But when I add a link to /usr/local/sesam/lib/libssv.so that i need [QUOTE]g++ -Wall -o prog prog.cpp -L/usr/local/sesam/lib -lssv -Wl,-rpath …

Member Avatar for Spartan552
0
167
Member Avatar for Xokzin

Hi There, I'm learning C++. One of the questions requires a function to do a calculation below. I have no clue how to do this. Can anybody help? [QUOTE]WeTryToHelp gives bursaries to help students with buying their textbooks. The amount of money depends on how many modules the student passed …

Member Avatar for Xokzin
0
124
Member Avatar for zoner7

Typically the code that I have seen uses phrases such as i++ as opposed to ++i. Recently, in a recently purchased book, I have seen the former implemented. As I understand i++ means that the addition takes place after the line is executed and thus with the initial value of …

Member Avatar for Abzero
0
242
Member Avatar for agodislife

Can someone help me with this probem please. Thank you. [code=cpp]#include <iostream> #include <iomanip> using namespace std; int main() { double pay_rate, hours, regular_pay; double overtime_pay, gross_pay, tax, net_pay; // The functions receive no parameters and return no results. // All communication is through the global variables. void Calculate_Gross_Pay(); void …

Member Avatar for Sky Diploma
0
88
Member Avatar for pa3k80

how make program run as service... I need the option in program, which program run in the background. Anybody has a tutorial about this...

Member Avatar for Salem
0
108
Member Avatar for agodislife

Hi, could someone please help me with this error message, I 've included my program along with the error message. Thank you. Compiling... C:\Documents and Settings\\Lab7\Lab7.cpp(33) : fatal error C1004: unexpected end of file found Error executing cl.exe. Lab7.obj - 1 error(s), 0 warning(s) [code=cpp] #include <iostream> using namespace std; …

Member Avatar for VernonDozier
0
96
Member Avatar for nurulshidanoni

Dear all, I have this code and this data...but i want to sort the sum1 in descending order..but my problem is..i want to sort many array....like this.. after sort 3: ............. 46 1: .............. 25 2:..................20 how to sort in descending order together with the row? 1: 5 6 7 …

Member Avatar for nurulshidanoni
0
116
Member Avatar for hewara

hi everyone, i am struggling with a code and i need help! if u help me i appriciate... the result that i want to get is "value of myarray[0]=0.577 or 0.5" and the others value of myarray[1] and value of my array[2] is zero. i am using devc++ compiler. i …

Member Avatar for hewara
0
92
Member Avatar for cbattagler

I am attempting to read in a comma delimited file and only take in the first three values. At the moment the code I have obviously does not work. The text file is laid out like this: [code]1249968.646,16761001.880,1206.990,1,2,104,3,218210.549527[/code] At the moment this is what my read in code looks like: …

Member Avatar for cbattagler
0
188
Member Avatar for Jennifer84

I have about 20 vectors like the example below inside a buttoncontrol that will push_back data. This buttoncontrol and all the vectors will read a .txtfile that takes up 1.5 MB. So together the 20 vectors will fill data with a total of about 20 MB when I press the …

Member Avatar for Jennifer84
0
121
Member Avatar for efp1225

I am trying to include the posix library in my Visual Studio 2005 projects, and I am unsure how to include it. I have the posix.lib file and I added it to the additional dependencies of Configuration Properties->Linker->Input. When I build, I get the message that it can't find the …

Member Avatar for Zabbat
0
111
Member Avatar for anbuninja

Write a function called calc() that receives two real numbers and a character and returns the sum, difference, product or quotient of the two numbers passed to it depending on whether the character is equal to a '+', '-', '*' or '/', respectively. Write another function that displays the following: …

Member Avatar for Duoas
0
87
Member Avatar for Gagless

I am working on a recursive function that does multiplication so I don't have to use the * operator or loops. What I'm stuck on right now is how to get it to produce negative products. I thought the code for positive products subtracted from 0 would work, but I …

Member Avatar for Gagless
0
150
Member Avatar for Bitto11

Hello ppl I am new to c++ and especially a noob in graphics. All the functions I have learnt are from Help File in Turbo c++ 3.0. Since this part of c++ is not in my course, I am having difficulties learning it. Now, in the following code the[B] outtext …

Member Avatar for Bitto11
0
178
Member Avatar for pa3k80

How make in MFC C++: i need a function, the function has read a txt file and put a message box with text which is in txt file.

Member Avatar for mitrmkar
0
102
Member Avatar for CoolGamer48

Hey, I'm having a problem with my RPG. I'm trying to get a player to move from one room to another. All the coordinates (and other properties) of all the objects inside a given room are contained inside a text file, and this includes the properties of an exit to …

Member Avatar for mitrmkar
0
84
Member Avatar for L31chH4rdT

Hey guys, I'm at the losing end of a problem involving strings and char input. Basically, I have a tree full of morse code and alphabet equivalents in struct morsetree that i will decode against. so when i decode **** * *-** *-** --- *-- *** *-* *-** -**, i …

Member Avatar for Duoas
0
289
Member Avatar for petzoldt01

A some point in my program, it is necessary for me to start a child process (Im on linux, btw, ubuntu gutsy). The process streams DV to stdout, but can be controlled in an "interactive mode" through commands to stdin. How does one establish streams going both ways? If you …

Member Avatar for Duoas
0
339
Member Avatar for Nemoticchigga

[CODE] private: delegate System::Void delegate_function(void); if(this->InvokeRequired) { AsyncCallback ^ac = gcnew AsyncCallback(&WCS::MainForm::delegate_function_callback); delegate_function ^df = gcnew delegate_function(this, &WCS::MainForm::function_to_invoke); System::IAsyncResult ^asyncresult; //Begin invoke command here. try { asyncresult = df->BeginInvoke(ac, df); //asyncresult = this->statusLight->BeginInvoke(ac, df); //this->commsStatusLight->EndInvoke(asyncresult); //df->Invoke(); df->EndInvoke(asyncresult); //df->DynamicInvoke(ac, df); } catch (...) { std::cerr << "caught"; } } public: System::Void …

Member Avatar for Nick Evan
0
84
Member Avatar for chrissyln13

I am trying to write this "program" for my distance ed course and I almost have it done I just can't figure out how to get the values from the function BoxDimensions into the function DisplayData so that it can print out the dimensions. Help???? Thanks. [CODE]#include <iostream> using namespace …

Member Avatar for chrissyln13
0
128
Member Avatar for Xokzin

Hi There, I'm a begginer in C++. In the program below the value must be returned to display the appropriate message. I expiriencing problems trying to compile the program. The erro message: [Warning] In function `bool passOrNot(char)': non-lvalue in assignment Can you help. Thanks #include <iostream> using namespace std; int …

Member Avatar for Xokzin
0
80
Member Avatar for yap

Hi all in here, It is said that system("PAUSE"), automatically generated by dev-c++ for console application, to prevent console window of disappearing instantly would be not standard c++, furthermore it would be consume much of a computers resources. What is a good replacement for it? I have been experimenting with …

Member Avatar for tesuji
0
2K
Member Avatar for vieestchien

Hello, I am trying to generate a very large uniformly distributed pseudo-random number (around 15 digits, similar to Random.nextLong() in Java), the problem is that both rand() and random() only return int/long type (10 digits max). Is there any way to generate pseudo-random number in long long int type? Thank …

Member Avatar for tesuji
0
80
Member Avatar for Mantu89

For example I have string that contains hexadecimal numbers: std::string hexStr = "E110A3" and I want to convert it to char. So that char hex[3] = {0xE1, 0x10, 0xA3} How I can accomplish this? I tried to search but I didn't find answer to this.

Member Avatar for Mantu89
0
3K
Member Avatar for Sky Diploma

Help Me with this code. i JUST installed code::Blocks and am not familiar with the errors , I wanted to know what is going wrong with this? [CODE=CPLUSPLUS] #include <iostream> using namespace std; int f(); class Date{ int d,m,y; static Date default_date; public: void set_default(int dd,int mm,int yy); Date(int,int,int); Date& …

Member Avatar for Sky Diploma
0
141
Member Avatar for banban2008

i want to do program that calculat percentage of error percentage of error ={ X ( calculated) * X ( measuered) } * 100 / { X ( measuered)} and if the result more than or equal 50 it is bad if it is less than 50 til 20 it …

Member Avatar for e_pech
0
151
Member Avatar for joshmo

Am trying to edit and also delete data in my text file but am finding a little problem...i want to read the specific text and the program stops when it reaches an end of line and not eof..i tried using '\n' but maybe I used it wrong cuz it cant …

Member Avatar for VernonDozier
0
160
Member Avatar for JoE Guana

Hey guys, i'm new here and i'm also new to C++. I have a task where I have the user input a file name and then the program loads it into an array of type struct then finds the top 3 values and outputs them. I am so stuck right …

Member Avatar for VernonDozier
0
216
Member Avatar for lahom

hi i have anew class which my dialogs should be based on it instead of being based on CDialog. two weeks ago ...when i inserted a new dialog and create a new class for it ..i was able to choose my new class from the drop down list. but now …

0
55

The End.