51,593 Topics

Member Avatar for
Member Avatar for viziroth

ok so I have what seems like a simple problem... simple code [CODE] int date; cout << "Enter the date in MMDDYYYY format: "; cin >> date; [/CODE] problem happens when someone starts the int with a 0 for example cin >> 03081991 date = 24 if I add another …

Member Avatar for iamthwee
0
106
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
286
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
121
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
244
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
350
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
63
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
88
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
206
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
181
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
686
Member Avatar for free_eagle

Hi everyone ! I am completely new here , so here is a link to C language tutorial I think that'll be usefull for beginners ... [url]http://www.phim.unibe.ch/comp_doc/c_manual/C/master_index.html[/url] ^_^

Member Avatar for lionaneesh
0
82
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
169
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
195
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
252
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
177
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
467
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
270
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
152
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
66
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
172
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
123
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
499
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
155
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
106
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
209
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
65
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
346
Member Avatar for gendler.max

Hi, I am writing a program for my C++ class that must create a struct(Hero) and make an array of it. My class is using the lvp library and i was wondering if anybody could help me make a vector of hero objects. This is what i have so far: …

Member Avatar for gendler.max
0
137
Member Avatar for Roo0ond

I am a student at the university .. I have many tests .. and I have a project to earn a few degrees .. I want to convert such a difficult equation, known as Chebyshev? A program in c + +

Member Avatar for Fbody
-2
82
Member Avatar for kalrajhi

//Program checks employment status, if part time, NO VACATION, if full time, program goes into if/else nest and asks for number of years working at company. More than five years,full time employee granted 3weeks of vacation. Five years or less, full time employee is granted 2weeks of vacation. [CODE]#include <iostream> …

Member Avatar for kalrajhi
0
175
Member Avatar for smitysmit

can i make a program open another program after a user selects it such as i am making a menu and i want if the user enters 1 it opens the program accociated with 1 or will i have to paste all the files from the external program to the …

Member Avatar for restrictment
0
153
Member Avatar for athenaabc

Hi i'm a student and have problem with moving bitmap. I must load it in the center of client area and after there moving using keys but it doesn't work :( Can you help me this is the code:[CODE] CKursovaView::CKursovaView() { size=CSize(50,50); // TODO: add construction code here } CKursovaView::~CKursovaView() …

Member Avatar for soniakhan33
0
132
Member Avatar for Whizzy

As requested by a friend in email, I wrote a a simple attack routine in a 20d ad&d style. As you all can see, I'm not a programmer. I dabble. I was trying to show how the attack is calculated, nothing much more than that. Though this code works, it …

0
41
Member Avatar for prodstar

hi i'm currently in need of a quit option i have something like for example click 2 for quit but i don't know how to make a command for it, could someone please help me

Member Avatar for finito
0
69
Member Avatar for restrictment

Hey everyone, I got bored and decided I wanted to make a 'pitch' cards game in c++, however I came across the problem of generating all 52 cards in a deck without duplicating the same card. So basically, I just want to print out every single card in the deck …

Member Avatar for iamthwee
0
197
Member Avatar for empror9

hello, i want write a simple programe wich count the number of the chrechtar this is my code [CODE] #include <iostream> using namespace std; int main() { int count = 0; char str[30]; cout << "enter a word: " << endl; cin >> str; for (int x = 0; x …

Member Avatar for siddhant3s
0
163
Member Avatar for ShahdaaD

[COLOR=#555555][B][I]hi guys, I am a Beginer Programmer.[/I][/B] :confused: [/COLOR] [COLOR=#555555][B][I]I Like to Learn about C# and i started from a week ago.[/I][/B][/COLOR] [COLOR=#555555][B][I]I Searched in google to find a froum to get some help about C#.[/I][/B][/COLOR] [COLOR=#555555][B][I]and i found this website.i hope i can find some friend to get help.[/I][/B][/COLOR] …

Member Avatar for kvprajapati
0
172
Member Avatar for jellybeannn

I've got this code that creates a Table and a graph, the values have to be int for the graph. But in the table I want t display the values as... 1,000,000 How can I do this?? [code] public partial class output : System.Web.UI.Page { int max = 0; int …

Member Avatar for finito
-1
110
Member Avatar for so0oso

i write now code the game of hang man i want code sound in eclipse if true or false Brief sound teacher she said the cod is one line after Loading any sound plaaaaaaaaaase i want help

Member Avatar for Salem
0
115
Member Avatar for melteddashboard

Hey I'm new here so forgive me if I do something wrong. Just let me know and I'll try to fix it. Basically I'm trying to write a binary search tree without using recursion. (Difficult I know, but if you can show me how to do it without changing the …

Member Avatar for VernonDozier
0
436
Member Avatar for JunChen

i am trying to merg two linked list. error occurs when i run the program it dead. i believe it is because the function i defined to merge these two list has problems would someone helpe me to fix it or some hint would be nice thanks[code]#include <stdio.h> #include<malloc.h> typedef …

Member Avatar for Lerner
0
137
Member Avatar for livestrong2431

I'm trying to create a simple network with perceptions and it doesn't seem to be working. I was wondering if someone could correct my mistakes. Thanks! [CODE]#include<iostream> #include<cstdlib> using namespace std; int pWeights[] = {0,0}; int Classify(int pInput, int pThreshold, int i, int Bias){ int classOut; if( pInput*pWeights[i] + Bias …

Member Avatar for livestrong2431
0
143
Member Avatar for fellixombc

How can I fix this so it will let me compare the two? note, the error is at the for loop. [CODE]string Socket::Recv() { /* Get socket size before recv'ing */ while (size == 0) ioctlsocket(client, FIONREAD, &size); /* Create a 'string (characters)' the size of the information being recv …

Member Avatar for fellixombc
0
127
Member Avatar for nkinar

Hello-- Inside of a header file (Point.h), I've created a class template. I need to override the addition operator as shown below, so what I have done is declared it as a [I]friend[/I]. However, when I try to access the private member variable [I]std::vector<T>coord[/I] from within the body of the …

Member Avatar for nkinar
0
223
Member Avatar for strmstn

Hi. I have a richedit control and when dropping text from another control I would like to change the format of that text. I wonder which messages I should trap or how to do this in plain Winapi. (I have already subclassed the pasting message) Thank you.

0
124

The End.