49,761 Topics
| |
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 … | |
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 … | |
| 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 + … |
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( … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
| 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 … |
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 … | |
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 … | |
[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 … | |
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 … | |
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> … | |
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 … | |
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? | |
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 | |
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 … | |
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& … | |
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> … | |
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 … | |
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 … | |
I need to be able to use the /P compiler option, how do I set them in VC++ 2008? | |
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. | |
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 | |
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 … | |
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. | |
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: … |
The End.