49,761 Topics

Member Avatar for
Member Avatar for bletchley

Hi. I'm a Java programmer making the switch to C++. Could someone enlighten me as to what's going wrong here: [B]g++ -o fermat.cc main.cc[/B] main.cc: In function `int main()': main.cc:8: error: `Fermat' was not declared in this scope main.cc:8: error: `f' was not declared in this scope main.cc:8: error: `Fermat' …

Member Avatar for nezachem
0
124
Member Avatar for cecp

Can anyone help how to develop simple GUI in Win API. The window should looks like "Options windows" in Firefox (Tools->Options). I would like to create something when I click on the button above(like in FF) the content in below will change. I know how to implement it, but I …

0
30
Member Avatar for sgriffin

How would you fill a 2d vector with NULL. I've tried doing [CODE]vector<vector<int> > data; data (10, vector<int> (10,NULL))[/CODE] But I get an error, and I've also tried setting it to NULL through two for loops and that produces an error as well. Can someone point out what I'm doing …

Member Avatar for sgriffin
0
89
Member Avatar for aleX_X

Suppose I have a vector that is of class X data type. I was wondering if I could access the classes functions through the iterator of the vector, and if I could then what would the code look like? Would I just call the function the way I would normally …

Member Avatar for mrnutty
0
84
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
103
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
253
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
117
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
336
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
673
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
173
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
465
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
169
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
489

The End.