49,755 Topics
| |
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: … | |
Hello, I'm currently in High School and looking for a career in programming, and my dilemma is this: Game programming or Software Engineering? I have heard the horror stories of terrible hours and bad job security in game programming. But I haven't heard much about software engineering. Please enlighten me. … | |
[CODE]#include<iostream> using namespace std; struct Base{ virtual void print(){cout << "Base"<< endl;} }; struct Derrived : Base{ void print(){cout << "Derrived"<< endl;} }; template< Base* arr,int size = 10> class Template{ public: void print(){arr->print();} };[/CODE] [CODE]#include "template.h" int main(){ Base *b = new Base(); Derrived *d = new Derrived(); Template<b> … | |
I'm working on a project. It involves networked code, so I wanted to send it to a friend to test it with. I sent him only the .exe in my Debug folder, and it had an error on opening. It said something similar to "can not open because side-by-side config … | |
is there a short hand way of passing just a row in a 2d array into a function that accepts only 1d arrays. for example something like this even though I know that this doesn't work. I don't want to have to use loops to copy a row from the … | |
Hi. Im making a program which uses an array from the main function and passes it to a function which displays a table. However i am having a problem with calling the function in the main. When i compile my program it shows error LNK2001 (unresolved external symbol). Thanks for … | |
Dear All, I have been stuck and confused while bringing changes in this program which i got from [url]http://www.dreamincode.net/code/snippet76.htm[/url] This program uses a simple 0xFACA character and adds and subtracts for doing encryption and decryption. Now what i want to use is asymmetric encryption technique or we can say part … | |
Hello Can define template<int n> class myClass{...........} can I define template <Base *b> class myTemp{ ............. } while class Base is defined properly. Thank you. |
The End.