49,761 Topics
| |
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' … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
How can I get an RGBQUAD array of the pixels from a bitmap created from the screen(screenshot/printscreen). | |
Hi guys, I do need a c++ programm which may "Count vowels in monosyllabic,two syllable and longer words within a string/sentence" bye. | |
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 … | |
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" | |
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 | |
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, … | |
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 … | |
[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 … | |
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 … | |
I would like to know how to do this. Are there any functions specifically for it? Or do you have to do it manually? | |
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() { // … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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? | |
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 … | |
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> … | |
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 = … | |
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 … | |
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 … |
The End.