49,761 Topics

Member Avatar for
Member Avatar for ExMachina

Hello all, So to start off I'm just starting to learn programming so please excuse a lot of my noob mistakes especially when trying to explain what is going on/wrong. I've been trying to use a header file in an example program I'm trying to complete but the compiler doesn't …

Member Avatar for Frederick2
0
168
Member Avatar for omri374

Hi, I'm programming an application that records video samples of 5 seconds each. the recording takes place inside a loop. I use MFC and DirectShow The thing is, that the main thread must pause for 5 seconds while the sample is being recorded. in order to do that, I can …

Member Avatar for omri374
0
379
Member Avatar for Oritm

Hello all, I'm used to java programming and php. I'm trying to learn C++, but it's rather difficult for me. Basic in java: String message = "Test"; String temp = "This is a " + message; temp now contains "This is a Test". In c++ i tried everything, a + …

Member Avatar for Lerner
0
133
Member Avatar for dpreznik

I am facing a problem with a CArray. I have a class member of type CArray<MyType, MyType&> m_MyArray; When the object is destroyed, of course the destructor of CArray<MyType, MyType&> is called. Here is the destructor: [CODE]template<class TYPE, class ARG_TYPE> CArray<TYPE, ARG_TYPE>::~CArray() { ASSERT_VALID(this); if (m_pData != NULL) { for( …

Member Avatar for Tom Gunn
0
209
Member Avatar for Demonisya

Hello guys i need help on my program factoring.... i have the progam here but the bad news is it is been giving me -3242 or infinite number as an output... I already been so busy changing any thing but i cant make the output correct the way it should …

Member Avatar for minigweek
0
2K
Member Avatar for xfreebornx

[CODE]#include <iostream> #include<vector> #include<ctime> #include<algorithm> using namespace std; struct student { int id; char name; char nationality; char gender; student() : id(0) , gender(' ') { } student(int i, char g) :id(i), name(g) { } }; void insert(student array[]); bool sortByID(const student& a, const student& b) { return ( a.id …

Member Avatar for hao001
0
318
Member Avatar for kreskin

Hi guys, I am new with c++, so please bear with me... I am reading in a text file that similar to this: $ABCDE,12345,12345,12345,12345.... I need to be able to place each number in a variable like: A = $ABCDE B = 12345 C = 12345 ... I can get …

Member Avatar for kreskin
0
140
Member Avatar for wyett

Alright. Basically the point of this program is to allow a user to select how many fractions they want printed on the screen. It is supposed to print 3 fractions PER line. If a user requests 4 fractions..it would print 3 and print the 4th fraction by itself on the …

Member Avatar for wyett
0
114
Member Avatar for shuffman

I'm working on this problem that has n positive integers in a row except for the first column, which always contains zero, these numbers represent the cost to enter each column. I'm supposed to get to the end of the board with the path that costs the least. I can …

Member Avatar for shuffman
0
79
Member Avatar for onaclov2000

So I guess my question is: Can I grab an entire line using cin.getline(), and grab an entire line and ignore the whitespaces? What I'm trying to do is grab the following line: 2 3 and I want to know how many numbers are in it? OR maybe a better …

Member Avatar for necrolin
0
120
Member Avatar for Lukezzz

In a textChanged event for a textBox I am trying to do a search function for ListBoxItems like below. It seems that I have done the code correct but no items is selected and when writing a string that is longer in length than the item that is shortest in …

Member Avatar for Lukezzz
0
79
Member Avatar for ellimist14

Sorry about a n00b question but I'm having trouble. I'm messing around with linked list to try to get a good handle on them for the program I have to write. The program below was intended to fill a link list with structures then print out each structure. Instead it …

Member Avatar for ellimist14
0
114
Member Avatar for jwill113

[code] #include <string> #include <iostream> #include <fstream> #include <list> using namespace std; #include "mono.h" int main() { int e; string m; string z; string fname; mono * mptr; mono * mptr2; list<mono>P1; list<mono>P2; list<mono>::iterator P1itr; list<mono>::iterator P2itr; cout<<"Menu"<<endl<<endl; cout<<"A Enter two polynomials from a file"<<endl; cout<<"B Enter two polynomials via …

Member Avatar for jwill113
0
102
Member Avatar for helpme123456789

This is what I have so far. This isn't working and this isn't even close to working. I'm not that experienced at C++ so I was hoping that someone would help me please. The assignment is basically to write a code to validate an email address to see what characters …

Member Avatar for VernonDozier
0
219
Member Avatar for Avatar99

It compiles and executes but for some reason my vectors do not initialize in the fillarrays function. What am I doing wrong? [code]#include <iostream> #include <conio.h> // for getch() #include <vector> using namespace std; bool and (std::vector<bool> p, std::vector<bool> q, int i); // returns bool for and bool or (std::vector<bool> …

Member Avatar for Avatar99
0
135
Member Avatar for ThomsonGB

I have attached a .JPG file to this post. I am just starting out with the microsoft visual c++ and I wonder if someone could show me an example like this that would simply show the progress bar mve when the Trackbar is moved. I just need to see the …

Member Avatar for Protuberance
0
96
Member Avatar for scrypt3r

I have a program that injects a MessageBox Dll into a running process, although the user has to input the process to injects PID, is there a way to get the process PID from its image?

Member Avatar for William Hemsworth
0
161
Member Avatar for bal_1991

okay..so here's the thing......i have a test comin up tmrw regarding stacks and queues using templates....but my knowledge abt templates is minimal...could you plz suggest some links so as to understand templates from the scratch??? thnkx bal_1991

Member Avatar for bal_1991
0
91
Member Avatar for Tom Tolleson

Hey, guys. I've decided to learn C++ for fun while we're having some downtime here at work. I'm using Microsoft Visual C++ and it doesn't explain a couple of bits of basic syntax: On the line int main () What does "int" stand for? It seems to be used for …

Member Avatar for Tom Tolleson
0
127
Member Avatar for pratzmnnit

I want to write a function, bool brokenDownTime(const time_t& time, const string& timezone, struct tm& brokenTIme); here brokenDownTIme() should convert the 'time'(since EPOCH) to broken down time 'brokenTime' after adjusting for the timezone specified by 'timezone' Thanks, Prateek |[code]I want to write a function, bool brokenDownTime(const time_t& time, const string& …

Member Avatar for Salem
0
86
Member Avatar for Ultratermi

Hey. Im working on a new Project but i need your help converting a std::string to double! I dont know why i get the LNK error so i hope someone of you know it :). Here are the includes... [code=C++] #include "stdafx.h" #include <windows.h> #include <iostream> #include <stdlib.h> #include <stdio.h> …

Member Avatar for Ultratermi
0
133
Member Avatar for volscolts16

I am getting this error when I compile. I have tried taking Add out the code, but I do not get an output then. How can I fix this to produce an output?? [CODE] //This program serves as a test for the Matrix class #include <iostream> #include "Matrix.h" using namespace …

Member Avatar for Salem
0
182
Member Avatar for xfreebornx
Member Avatar for VernonDozier
0
102
Member Avatar for power_computer

I am in a comp. sci course in uni. We use CentOS and the CC terminal line compiler. On my laptop I work in windows and use Dev C++, I've created a custom header file which contains a class and I want this header file to be used in a …

Member Avatar for Protuberance
0
139
Member Avatar for tomtetlaw

I need to be able to use the /P compiler option, how do I set them in VC++ 2008?

Member Avatar for kvprajapati
0
23
Member Avatar for Bezelis

Hi to all, I would like to optimize my programs compiled with Visual Studio 2008. I know there're flags to enable the instruction sets of CPUs (MMX, SSE, SSE2, ...). Can you please tell me how and where I have to insert these flags? Thanks in advance.

0
62
Member Avatar for atch

Hi, guys. Just installed new borland c++ 2010 - I think it's quite cool. One question though, where can I find comment and uncomment command? Thank you

Member Avatar for atch
0
154
Member Avatar for crh0872

Hello DaniWeb, So I have a function: [CODE] time_t current_time = time( NULL ); while ( 1 ) if ( time( NULL ) == current_time + 3600 ) // execute body every hour { // stuff current_time = time( NULL ); } [/CODE] This is the only way I could …

Member Avatar for omri374
0
83
Member Avatar for jegathis

Hi thr, I'm Jega, doing a project on data preprocessing using discretization(data mining methods). There is an algorithm called EFB(Equal Frequency Binning) using C++ as coding. Do any1 here familiar with machine learning. I got the algorithm, but coding part, i just too weak in tht.

Member Avatar for jegathis
0
141
Member Avatar for F2guy

Can you see why the code from simulation.cpp marked with: // clipped output start and // clipped output end produces the clipped output below.(The "..." is where I deleted repeating output to make it more readable) Letter key can be found below after output. Initializing neural network... SOMa memory usage: …

Member Avatar for Salem
0
137

The End.