49,757 Topics

Member Avatar for
Member Avatar for Samoht VII

Ok so I am trying to write a piece of code that when a user inputs say "A = 'ls'" instead of outputting the files from the directory it will store the output in 'A'... If you get what i mean. SO say the directory /Desktop has stuff.txt and main.cpp …

Member Avatar for Salem
-1
224
Member Avatar for lucvosters

I read the article on [url]http://opencv.willowgarage.com/wiki/VideoCodecs[/url]. I have a question regarding colorspaces in opencv. If I read a video which is encoded in e.g. YUV4:2:2 color format in OpenCV by: cap = cvCreateFileCapture(“input.avi”); IplImage *in = cvQueryFrame(cmdl->ifile); Will in then always be in the BGR colorspace? Or will in be …

Member Avatar for Salem
0
100
Member Avatar for Kesarion

How can I get an RGBQUAD array of the pixels from a bitmap created from the screen(screenshot/printscreen).

Member Avatar for Salem
0
112
Member Avatar for 9122080

Hi guys, I do need a c++ programm which may "Count vowels in monosyllabic,two syllable and longer words within a string/sentence" bye.

Member Avatar for niyasc
-5
243
Member Avatar for choragos

Hello all. I'm almost certain this question has been posted before, but I couldn't find it--I apologize if it's a repeat. Anyway, I'm having a peculiar problem using getline when reading to a file. I know exactly how the file will be formatted, except the presence of comments at the …

Member Avatar for choragos
0
333
Member Avatar for hr1212s

this code in c++ [CODE]#include <iostream> using namespace std; int main() { return 0; } struct X; struct Y; struct Y { X ox; }; struct X { Y oy; };[/CODE] gives error as:"field `ox' has incomplete type"

Member Avatar for Banfa
0
61
Member Avatar for CanYouHandstand

Hey All I've been programming in C# for a while, but thought I'd get back to my C++ roots. Was wondering, does visual studio have a shortcut for automating the "->" operator? I'm so used to C#'s intellesense, I'm afraid I may go crazy. Many thanks Cam

Member Avatar for Ancient Dragon
0
86
Member Avatar for neoxyn

I'm building a chatbot for an external chatprogram. However, if my input in the chatprogram is, for example "1", in the console window it gets double processed: 21 [12:53] <new1234> 1 21 [12:53] <new1234> 1 I don't understand why this happens. [code] while (1) { LRESULT length = SendMessage(childchat, WM_GETTEXTLENGTH, …

0
33
Member Avatar for Robert1995

Heya , I was thinking of making a site opener application :). But I had a lots of problems . The next problem is facing this , it just crashes.:( [B]What do I want my program to do ?[/B] I want to assign a nickname for each of my favorite …

Member Avatar for Robert1995
0
200
Member Avatar for VERMUNDr

[CODE] #include <iostream> using namespace std; const int ROWS = 3; const int COLS = 3; //char matrix[3][3]; void showBoard(char[][3]); void pTurn(int&, int&); void checkPlayerWin(bool&, char[][3]); void checkCompWin(char[][3], bool&); void checkForBlock(char[][3], bool& ); char compRandomTurn(); void compWinCheck(); // Main // Main// Main // Main// Main // Main// Main// Main// Main …

Member Avatar for Robert1995
0
179
Member Avatar for Talguy

I am still working on my realtime application for my car that will be running on Minimal Ubuntu and the gtkmm library. My current application runs alright for a singly thread application. I am in the process of multi-threading it (still learning threads). What I thought would be the best …

Member Avatar for Talguy
0
661
Member Avatar for SquirrelProdigy

I would like to know how to do this. Are there any functions specifically for it? Or do you have to do it manually?

Member Avatar for yangacer
0
165
Member Avatar for prodstar

hi im trying to read a txt file and could you please check what is wrong with this? this is my code [CODE]// This program will calculate the charges for shipping #include <iostream> #include <iomanip> #include <string> #include <cstdlib> using std :: ifstream; using namespace std; int main() { // …

Member Avatar for jonsca
0
191
Member Avatar for lightshift

Hey all, am stuck! Basically I have a version of the Game of Life to create and I am currently having trouble with moving the items in the array. Basically my code shows the 20x20 grid, populates it with .'s to start, then adds 5 x's and 100 o's. That …

Member Avatar for lightshift
0
249
Member Avatar for aloush91

Hello everyone,,am os glad to join daniweb finally ! i like all of u and i think u're really smart guys am facing really hard assignment i couldn't do it at all :( the issue is ; 1. Write a program that finds and prints all of the prime numbers …

Member Avatar for Banfa
0
171
Member Avatar for nageshkore

In an ancient land, the beautiful princess Eve had many suitors. She decided on the following procedure to determine which suitor she would marry. First, all of the suitors would be lined up one after the other and assigned numbers. The first suitor would be number 1, the second number …

Member Avatar for iamthwee
0
463
Member Avatar for eggberto

When I start to debug the following code in Visual C++ and it runs in debug mode, it gives me this error: "Unhandled exception at 0x1027d51c(msvcr100d.dll) in st.exe:0xC0000005: Access violation reading location 0x00000009." The weird part is that the program starts to run, but shows me the error a little …

Member Avatar for Salem
0
265
Member Avatar for chathuD

guys i need a help on virtual function on c++. what is a virtual function and how to use it, and what are the benifits of a virtual function

Member Avatar for Salem
0
149
Member Avatar for sofakingjewish

I have to create a simple calculator and I dont know what I am doing wrong! The code I have so far, there are 23 errors I got it down from 42! Now I am stuck and dont know which way is up or down! [CODE]#include <cstdlib> #include <iostream> #include …

Member Avatar for jonsca
0
172
Member Avatar for fellixombc

How would I exactly do this? Heres what I'm talking about: src/test.h src/etc/work.cpp how can i get src/etc/work.cpp to include src/test.h?

Member Avatar for fellixombc
0
63
Member Avatar for prodstar

Hi, i'm trying to creating a program on c++ which relates to weight this is my problem so far [CODE] cout << "Enter weight between 1 to 60KG" << endl; cin >> weight; if (weight >= 1 && weight <= 60) cout << "Your weight is accepted" << endl; if …

Member Avatar for prodstar
0
167
Member Avatar for corby

hey guys/gals im havin a problem in my test.cpp file in line 65 where i have cout << date.print(); the compiler says: test.cpp: In member function âvoid Test::print() constâ: test.cpp:67: error: no match for âoperator<<â in âstd::cout << ((const Test*)this)->Test::date.Date::print()â where am i making a mistake because i have <iostream> …

Member Avatar for corby
0
2K
Member Avatar for hairE

Well this says 'solved', but i came across it with the very same homework problem. I attached my code, which works correctly and is pretty simple. Figure other students will have this problem in the future. Included the essentials. [CODE] int main() { char line[250]; //Array const int LIMIT = …

-2
21
Member Avatar for caut_baia

Hi guys.Can you write a program that reads data through a com1 serial port that communicates with a plc using c++ and inline asm instead of the ladder logic interface? I work at a cinema as a projectionist and the whole booth is automated with a bunch of these monsters …

Member Avatar for Ancient Dragon
0
121
Member Avatar for Samoht VII

Ok i am trying to have the user give a directory via the command line (./a.out /usr/bin) and then output all the files in that directory. I don't really know how to approach this but here is what i have tried. [CODE]#include <iostream> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include …

Member Avatar for caut_baia
0
465
Member Avatar for Atlanticspace

Ok so im having some trouble trying to figure out how to read a line from a txt file which ive incorporated my C knowledge about reading a txt file into this main file. apparently im getting it wrong and Im almost confused. any help would be nice. posting my …

Member Avatar for VernonDozier
0
154
Member Avatar for coding101

we started classes, i need some pointers on my code if you can help please. Define a class called Month. Your class will have one attribute of type int to represent a month (1 for January, 2 for February, and so forth). Include all the following methods in this class: …

Member Avatar for VernonDozier
0
103
Member Avatar for JPGleason

Hi Folks -- I'm an old Borland C++ 4.52 guy who used to rock at OWL and BDE in the 90's, but I'm not a programmer anymore. I still keep my fingers in it -- I've been maintaining a hobby app using my old BC++ 4.52 compiler from '95, and …

Member Avatar for Ancient Dragon
0
206
Member Avatar for VilePlecenta

When I included a dll file into my project, I used: [CODE] HMODULE g_hModule = GetModuleHandle( 0 ); HRSRC hRes = FindResource( g_hModule, MAKEINTRESOURCE( ID_DLL_MYDLL ), "ID_DLL" ); HGLOBAL hResource = LoadResource( g_hModule, hRes ); DWORD iResSize = SizeofResource( g_hModule, hRes ); BYTE* pData = ( BYTE* )LockResource( hResource );[/CODE] …

0
62
Member Avatar for crazykid

hey guys. i'm working on this project and i can't seem to get it figured out. there's a lot of steps involved, but i can't get any further right now because i cannot seem to figure out how to place values in an array. the program should ask the user …

Member Avatar for crazykid
0
345

The End.