49,761 Topics

Member Avatar for
Member Avatar for ekailan

" Unhandled exception at 0x76acfbae in AC.exe: Microsoft C++ exception: std::out_of_range at memory location 0x0015a140.. " Any advice on how to handle this error?

Member Avatar for pseudorandom21
0
60
Member Avatar for Gibran

Hey everyone, When i try to write any new c++ program and run it, it doesnt even build and a different one runs(the same one runs all the time). I use Quincy. However, any of my old c++ programs work fine, just any new ones that i try to run …

Member Avatar for sergent
0
168
Member Avatar for Derek Elensar

I have another problem... Let's start with said code: [code] #include <iostream> #include <fstream> //I have tried using fstream.h like my teacher instructs me to do/ #include <cstdlib> //but it gives me another error: see below, in actual post. using std::cout; using std::cin; using std::ios; using std::endl; //using namespace std; …

Member Avatar for Derek Elensar
0
1K
Member Avatar for lexusdominus

Id like to have my console program stopped and code executed if a timer runs out. does this mean i need another thread? can anyone point me to some functions i may need to use as ive never forked a program before. im using visual c++ on windows.

Member Avatar for Tellalca
0
514
Member Avatar for lexusdominus

Hey, ive got a problem. i cant seem to get Playsound() to work. Ive searched google, and alot of people say to go to properties - all configurations - linker - and add winmm.lib to the additional dependencies to link it. ok, so i did that, have included mmsystem.h, but …

Member Avatar for lexusdominus
0
95
Member Avatar for gcardonav

Hi guys: I created this code to read two file get their input and post certain output. My problem is that C++ is sorting out my output from smaller to greater. Is there a way that I can get c++ not to sort out the output. Thanks: Gus Here is …

Member Avatar for Sky Diploma
0
265
Member Avatar for VernonDozier

OK, the eventual goal of my project is a kind of word insert/delete/replace. You read a file... "The quick brown fox jumps over the lazy dog." and you can delete all instances of "fox", replace "fox" with "cat", insert "giraffe" wherever you want, etc. Word processing stuff. So I figured …

Member Avatar for Sky Diploma
1
229
Member Avatar for tim8889

Hello everyone, tim here. I am trying to use/modify a program to model a material in a 2D space. The shape is not too complicated. Now my thought is, instead of drawing it using the functions(which give me a headache, considering the shape has to be split to many piece …

Member Avatar for tim8889
0
191
Member Avatar for Trepach

Environment: MS Visual Studio 2008. (Please transfer this thread to where it belongs.) Project type: Windows Forms Control Library. Goal: Get the pixel color from a given process' main window. Already achieved: I got the desired process's pointer by using [code]cli::array<Process ^>^ Proc = System::Diagnostics::Process::GetProcessesByName("Notepad");[/code] I believe I got the …

Member Avatar for Trepach
0
411
Member Avatar for MixedCoder

[CODE] try { boost::asio::io_service io_service; tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v4(), 13)); for (;;) { tcp::socket socket(io_service); acceptor.accept(socket); //how do i make a checker here if the client is not sending anything then server send or if the client sending then server recive } } catch (std::exception& e) { std::cerr << e.what() << …

0
69
Member Avatar for kashif inayat
Member Avatar for lexusdominus

[CODE]if ( initialize == "off" && Iminor > 20 || Imedium > 10 || Isevere > 5 || Ifatal > 0 )[/CODE] the string type 'initialize' is cout'ing "on" and all of the values right of the AND operator are TRUE. Why is the subsequent code block for the if …

Member Avatar for lexusdominus
0
128
Member Avatar for lexusdominus

[CODE]int thetime = time(NULL); string in; stringstream out; out << thetime; in = out.str();[/CODE] that's my code for casting an integer into a string, but im having a little trouble reversing it to change a string into an int. :/ can anybody help me out? you have to include the …

Member Avatar for lexusdominus
0
67
Member Avatar for EEETQ

Hi guys, I'm working on an assignment for my programming class and was wondering if I could get some help. The problem I'm having is that when I try to access the value of the map, I get a weird debug error. The program compiles fine but when I run …

Member Avatar for NicAx64
0
226
Member Avatar for Rocker Gang

Hi I am trying to open the system open dialog box by usinf CFileDialog class and i wanna display the image in my listcontrol,which(image) is selected from that open dialog box. I am able to get the file name of the selected image and i tried to Add it to …

0
50
Member Avatar for anaychowdhary

hi, I am looking for the code for the following program. Consider a set of elements and a given sum. You need to find a subset of elements whose sum equals or is greater[given there are more than one subset, print the one whose sum is closest to the number] …

Member Avatar for anaychowdhary
-2
171
Member Avatar for neilio86

I need to figure out how to get the min/max in this array. I heard that it can be done using the algorithm library. we have yet to learn that. any help would be appreciated. [CODE]#ifndef Lab4_h #define Lab4_h void GetTemperatures (int Temperatures[], int NumTemperatures); double ComputeAverageTemp (int Temperatures[], int …

Member Avatar for pseudorandom21
0
243
Member Avatar for Labdabeta

Is there any software out there that can help me create 3d models for use with OpenGL drawing of models (i.e: triangles, square and polygons in 3d space). I need to be able to make polygons in 3d and be able to access the values of the vertexes. Does anybody …

Member Avatar for mrnutty
0
107
Member Avatar for centerline00

Hello all, I am having a mental blank on checking user input (that is string) to check if it contains an integer value. as in: [code]for(i=0;i < nNames; i++){ cout<<"\nEnter a last name: "; getline(cin,name[i]); [/code] I have checked the C++ string class for string.length() and others, I am just …

Member Avatar for centerline00
0
261
Member Avatar for programing
Member Avatar for Narue
0
152
Member Avatar for Labdabeta

I decided to post this problem in a new thread. I have a simple program in OpenGL and it doesn't work. What happens is that a transparent window forms and when you hit the 'X' it says that the Release of the Device Context and Rendering Context failed. Here is …

Member Avatar for Labdabeta
0
199
Member Avatar for lexusdominus

Hey, ive got two string types [CODE] string string1 = '1'; string string2 = '2'; string string3 = string1 + string2; [/CODE] Ok, ive simplified my code. I would like string3 to equal '3', and not '12'. I dont know anything about casting. Please dont tell me to use an …

Member Avatar for lexusdominus
0
119
Member Avatar for Bitprior

Hello, and greetings to those I may be speaking with in this thread over time. I present to you a problem, rather fringed and minimal and troublesome. First, I'll start by saying that I don't really consider myself a programmer so much as I do an enthusiast who now, suddenly, …

Member Avatar for rubberman
0
195
Member Avatar for Jsplinter

I'm just starting a search for a library or code sample for grouping numbers together based on their distance from one another. For instance, in the set{1,2,4,25,28,29}, is there an algorithm that would identify two groups of numbers subsetA{1,2,4} and subsetB{25,28,29}? Nothing really came up in my google search, but …

Member Avatar for Jsplinter
0
253
Member Avatar for stupendousomega

I have a user input an integer... But if it's really long, it throws an exception and starts looping infinitely. How would I make it cut the number after the first 7 digits and only use that? Like, if I inputted 654897654321648435435135813513843513543514, it would only accept 6548976. Please help.

Member Avatar for mrnutty
0
212
Member Avatar for kutuup

I've trawled the internet searchiing for an explaination on how to do this. I'm working on an assignment and we are told to "transmit a whole object to the server". As far as I know, the send function of winsock2 only allows you to send data of type char, so …

Member Avatar for kutuup
0
490
Member Avatar for narlapavan

i am using QT software in solaris, i opened remote system through QFtp methods i.e.. connectToHost() after that, loged in through login(). now my problem is, i am trying to get data from remote system, through int get ( const QString & file, QIODevice * dev = 0 ) at …

Member Avatar for Topi Ojala
0
218
Member Avatar for Jimmyteoh

[CODE=java]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Plane extends JApplet implements ActionListener { JTextField input; JLabel prompt1, prompt2; JButton yesButton, noButton; int section, seats[], smoking; int nonsmoking, people; public void init() { input = new JTextField( 4 ); input.addActionListener( this ); prompt1 = new JLabel( "Please type 1 for …

Member Avatar for Nick Evan
0
209
Member Avatar for sachintha81

I have done pretty much all my programming using C# and very much a newbie to C++. However now I have to convert to C++ and is finding it a bit difficult. For example, I wrote a pretty simple program using C# to acquire a RegistryKey, then using a recursive …

Member Avatar for drkybelk
0
368
Member Avatar for montjoile

with this structures: [CODE]//Structure of binary tree typedef struct nodo_ab { int etiqueta; list primerapos; list ultimapos; char dato; struct nodo_ab* izq; struct nodo_ab* der; struct nodo_ab* padre; } nodo_ab; typedef struct nodo_ab *abb; //Structure of list typedef struct nodo_lista{ int dato; struct nodo_lista *sig; }nodo_lista; typedef struct nodo_lista *list; …

Member Avatar for montjoile
0
168

The End.