49,761 Topics

Member Avatar for
Member Avatar for OffbeatPatriot

The problem seems pretty simple but I haven't figured it out yet. I'm using wxWidgets to make a gui and this function gets called when I press enter while in a text field. [code=c++] void Camera_Settings::on_exposure(wxCommandEvent &event) { wxString temp = exposure->GetValue(); char *value = (char *)temp.mb_str(); char *hex_string = …

Member Avatar for OffbeatPatriot
0
153
Member Avatar for lolaabbydawn128

I have a very hard programming challenge and i need help... I have nothing so far, so im hoping somebod could help me build it... Im to write a program that uses a structure to store student name, student ID number, pointer to and array of test scores, average test …

Member Avatar for lolaabbydawn128
0
177
Member Avatar for bond124

hi all, I m new to C++(but have a very good knowledge of C) and very desperately looking for some good programming problems that involves some object oriented principles of c++.Can anybody please give a link to such problems.

Member Avatar for tux4life
0
97
Member Avatar for catagon

Hi guys. I have been working at this for several hours. I'm still a novice in C++. The program I need to write is suppose to calculate the day number for a given day represented by three type int values. It also needs a function that returns true if the …

Member Avatar for catagon
0
122
Member Avatar for Duki

Hey everyone, I'm trying to make it so that my ^ operator is right justified within this binary expression tree. For example, 2^3^4 should be evaluated as 2^(3^4). So I should get 2^81, instead of the usual 2^12. Here is the code I have so far. Everything works, except the …

Member Avatar for Duki
0
480
Member Avatar for marthpro899

My program must read a file and count how many times each letter comes up using vectors[27]. besides main there will be 2 required functions. int char2int(char arg) void display(const vector<int> & counters) the file has numbers to but those should be read as a O. need help please help!

Member Avatar for tux4life
0
123
Member Avatar for mmeyer49

I'm almost done with my 2D dungeon game, but for some reason i cannot move when my program calls to move i cannot move ever when i set the Vitality to 100 it sets it to 0. When i remove the params and make it so it will move it …

0
71
Member Avatar for yara naser

hi: please help me to find the code that convert nfa to dfa by using c++ and please send it to my email [email removed] thank you very much please help me now.....:icon_neutral:

Member Avatar for ArkM
0
100
Member Avatar for preet4fun

Write a program that shows a constructor passing information about constructor failure to an exception handler after a try block. What do i really need to do ?

Member Avatar for siddhant3s
0
144
Member Avatar for Peyton

Hi there, Say I have created an ifstream object in main(): [CODE]ifstream [B]inData[/B]; // Create new input file stream object inData.open( "input.dat" );[/CODE] How could I then pass this object to a function, instead of having to recreate it there? I.e. what would the argument and parameter look like? Thanks …

Member Avatar for ArkM
0
10K
Member Avatar for catagon

I'm unfamiliar with how to write recursive functions. Can anyone help me out here? I need a recursive function to see if date number 1 is greater than date number 2. If it is it returns true. If 2 > 1, it switches them and returns them like that. If …

Member Avatar for ArkM
0
90
Member Avatar for MindControl

Hi Guys, I want to ask about these codes, i don't understand clearly. So to understand these codes detail what kind of books i have to read and tutorial i have to learn. Please guide me. [code] #include <windows.h> int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE PrevInstance, LPSTR lpszArgument, int nFunsterStil) …

Member Avatar for Narue
0
162
Member Avatar for guest7

Hi, Following is the function which is giving me a segmentation fault. I do not know what is wrong in this code. I am counting the number of lines in the file. [ICODE] char f11; char c; int f12 = 0; FILE *ilfile; ifstream ficnf; int size_f = 0; int …

Member Avatar for Nick Evan
0
151
Member Avatar for nature_love

hey guys.. am learning c++ just started.. am not able to implement member dereferencing operators.. i know there basic definations and rules but...its like.. a clear picture is still not coming to my mind..as in how to make use of them.. please explain with examples..

Member Avatar for ArkM
0
268
Member Avatar for Clockowl

Hey guys, What am I doing wrong here? sss.hpp [code=cpp] #include <fstream> #include <string> #include <map> namespace sss { using namespace std; class node { public: multimap<string, string> values; multimap<string, node> children; string &value(const string name, size_t index = 0); node &child(const string name, size_t index = 0); private: template …

Member Avatar for Clockowl
0
684
Member Avatar for slim2hott

ok i have vc++ and i am making a form app and i am putting a progress bar in it but how can i hide it for like x seconds. is there a function for it? or something which hides the object temporarily . Thanks

Member Avatar for MrSpigot
0
90
Member Avatar for catagon

Hi guys, trying to get a day number from 1 - 366 for a specific date. I've been working on this for a while. I can't seem to figure out. I'm not asking for an answer, just a push in the right direction. So far here is what I have …

Member Avatar for catagon
0
164
Member Avatar for valtikz

This is my next question: how to get a document from root? because I have this code: [code] myfile.open ("/home/ws14/Desktop/test.txt"); [/code] But I need to change the path home/ws14 if I change user. Thanks!

Member Avatar for valtikz
0
137
Member Avatar for Coder++

Hey guys, I just began this project a few weeks ago, just something I like to play around with in my spare time (my real passion is psp game programming :D). It is an interpreted programming language I like to call BIO (for basic input output). I feel that my …

0
72
Member Avatar for SallyJ

Hi I'm only new to C++ and need urgent help with an assignment that's due tomorrow. I know this is frowned upon but I'm really stuck and don't know what to do. Can someone please point me in the right direction with this question? (A) Read the first name and …

Member Avatar for ithelp
0
132
Member Avatar for preet4fun

Write a program that uses inheritance to create various derived classes of runtime_error . Then show that a catch handler specifying the base class can catch derived-class exceptions? am i doing it rite this is my code : [CODE]#include <stdexcept> #include <exception> using std::runtime_error; class DivideByZeroException : public runtime_error { …

Member Avatar for siddhant3s
0
146
Member Avatar for sailorsun

Hi guys : i'm new in programming, i'm reading c++ by dissection and for chapter 2 i encounter with a exercise that i can't solve it,please help me on it. the program is : Write a program that finds the maximum and minimum integer value of a sequence of inputted …

Member Avatar for siddhant3s
0
113
Member Avatar for ejiroy

I am making a program that reads from a .txt file and outputs the names that are in my .txt file into an output file that the user specifies. My program compiles but then I get an error that says "int main(): Assertion `fin.is_open()' failed. Aborted" What am I doing …

Member Avatar for siddhant3s
0
185
Member Avatar for itsraghu

Hi, I'm trying a very simple code as below. #include <fstream> #include <iostream> int main() { ofstream myfile; myfile.open ("example.txt"); myfile << "Writing this to a file.n"; myfile.close(); return 0; } But getting following error on myfile.open statement... Debug Assertion Failed! Program: ... File f:spvctoolsicrt_bldself_x86crtsrcopen.c Line 308 Expression: ("Invalid sharing …

Member Avatar for itsraghu
0
1K
Member Avatar for claydo

So, I have to write a program that calculates the five number summary of a .txt file with 2 columns and n rows. A snippet of the file would be 23 7.8 27 17.8 39 26.5 41 27.2 From this I am trying to input the numbers into a vector …

Member Avatar for claydo
0
247
Member Avatar for Lsmjudoka

I need to have my program use a function to read in numbers from a file to an array, and pass the array back to my main program to be outputted/used by another function; however, I am getting an error(cannot convert from 'int' to 'int [100]'): Here is the relevant …

Member Avatar for Lsmjudoka
0
171
Member Avatar for Zcool31

Hello everyone! I am looking for a simple free c/c++ IDE which does not need to create projects in order to build applications. If possible, I would like something that has code completion on par with MSVC Intellisense, or NetBeans code completion. However, the most important feature I am looking …

Member Avatar for MosaicFuneral
0
470
Member Avatar for jbennet

Can anyone reccomend any good C++ books (available on amazon preferably). Im not a total newb (I know java, php and vb.net), i just dont know that particular language that well. A book which covers data structures and concepts too would be beneficial, as im on a comp/sci course atm, …

Member Avatar for jbennet
-1
310
Member Avatar for ELewis08

Hey everyone. I'm new to the forums and to C++, and I was working on a program used to call data from a file containing various information about cars when I ran across the error: undefined reference to (and then it proceeds to list all of my declared functions). Here's …

Member Avatar for ELewis08
0
176
Member Avatar for kaseem724

i am trying to get my program to cout only certain arrays but i keep getting 0's and bus errors and segmentation faults. i think i have the general idea but i cant find a way to fix this problem. [code] #include<iostream> #include<fstream> #include<cstring> #include<iomanip> using namespace std; void findvin(int[],string[],string[],int[],int[],double[]); …

Member Avatar for nucleon
0
140

The End.