49,761 Topics
| |
I'm trying to use Box2D lib with SDL lib. NOTE that I only get the errors below after I link in SDL too. I think i link everything accordingly but in the end when I write up some code i get errors like: 1>------ Build started: Project: box2d test2, Configuration: … | |
I am currently working on implementing an operating system in turbo c which uses c as the programming language. For this project we must implement pagination. I have absolutely no idea how to do this in c and most web results are for web pages using mySQL or java or … | |
Hi all, hope you are well. I'm having some trouble trying to convert the literal value of a hex number to int. I say literal but I'm not sure if that is the correct term, but my code will explain better I hope. I have simplified the code down to … | |
Hi. I have made a simple testing program which I'll use in another program later. I create the items of the QListWidget through looping and now I want to make changes in one of the items of the list, which the user clicks. But when I call a fucntion to … | |
I am new to this forum. I need help in defining the same kind of function according to my requirements. as [url]http://www.codeproject.com/Articles/1088/Wildcard-string-compare-globbing[/url] I hope, I 'll get good response. Words are strings which are separated by dots. Two additional characters are also valid i.e:The *, which matches 1 word and … | |
So basically this is suppose to be a grade calculator and the program works, I now just have to put it into a do-while loop so it can work for more than one student. My professor wants it to say Y for another student and N to quit at the … | |
[CODE] #include <iostream> #include <string.h> #include <ctype.h> using namespace std; int main() { system("Color 1A"); char clear[200]; char cipher[200]; int x,i; cout << "what do you want to do with your password " << endl; cout << "1 Encrypt your password " << endl; cout << "2 Decrypt your password … | |
So I have a file that has contents that need to be stored into a growing object. By growing I mean that it'll explicitly concatenate the new line it reads into the growing object, pBuff, each time every line is read from the file. I only get the last line … | |
[B]On visual studio 10:[/B] I've tryed out some code and everything was fine, but when I use this line: [CODE]sf::RenderWindow App( sf::VideoMode ( 800, 600, 32 ), "Hexagon Puzzle Thing" );[/CODE] Or anything with RenderWindow I get an: Unhandled exception at 0x76adfeb8 in SFML + Box2D Project.exe: 0xC0000005: Access violation … | |
[CODE]struct Information { ifstream* in; ofstream* out; ... }; ..... ((*info).in)->eof() //this one (*(*info).in).eof() // and this one[/CODE] so, info is a Information struct, is there any different between the two shown above? my guess is they are the same. and what is "->" and "." called? | |
I have created a toolbar in mfc. I want to add this toolbar on my dialog. So in the dialog's OnInitDialog() function I am trying to create this toolbar. But the toolbar is not coming. Please tell me how can create it. [code] BOOL CDlgsViewDlg::OnInitDialog() { CDialog::OnInitDialog(); CToolBar toolBar; CRect … | |
Hello all this is my c++ web server that i can get working on my computer but not connecting to others for some reason. I am not on a router, just using my external ip address. If i run the server and type my external ip address into my browser … | |
I have code that will ask for the day of the week but is there a way to make it ask the question again if the user doesn't enter one of the 7 days provided? [CODE]string TheDay() { string whichday; cout<<"Please provide a day of the week - ex. Mo … | |
i want to read data from file. I have test.txt. In this i have data a:123 b:223 c:323 how can search 'b' and get the data 223 and so. I found some where that i can go via getline and than tell and for data grabing seek. but i do … | |
Can someone help me finish this code off. Its a simple program that prompts two players to pick a card. Each picks between 0-51. An array is holding each of the cards by rank and suit using a struct. Everything works great except the greater_than function. The only issue with … | |
Hello, I am trying to capture a video stream from a webcam, and simultaneously display the frames, using OpenCV. Previously, I have captured one image, and then at the end of my program displayed the image in a window, which works fine. However, when I try to capture a sequence … | |
I wrote a program that allow users input a double value, if I input a string or a char value, it turns out to be a logical error. I've tried this: [code=c++]bool h; float value; do{ cout<<"enter a value"<<endl; cin>>value; if(cin.fail()){ cout<<"error, enter a value!"<<endl; cin.clear(); cin.ignore(); h=true;} else h=false; … | |
Here is the Full assignment and what I have done so-far: [B](1) The program will ask the user to enter a filename from the console. (Just like the last assignment). (2) The initial configuration will be read in from a file, which will be a 12 by 30 two-dimensional array … | |
I am migrating my code from the builder 6 to embarcadeiro xe2 c++. The files.Cpp are constructed separately without problems, however when I build all comes the following error message-> [ILINK32 Error] Fatal: Unable to open file 'TYPINFO.LIB' FAILED! And the process ends! Can anyone help me? | |
a friend asked me to help him with his lab. the lab involves opening a file and adding the numbers in the file together displaying how many even and how many odd numbers there are. I have the file "textinput.txt" in the directory with the .cpp file but when i … | |
I am having a problem with my code, it is suppose to be rearranging the characters inside the array, but every time i enter the lower bounds (x) and upper bounds (y), i rearranges the wrong alphabets. Here is my code [CODE] int main() { char a[5]={'A','B','C','D','E'}; int x, y; … | |
To what extent does the system endianness effect a program. I know that doing pointer assignment will be affected, and unions are too, but what about bitshift operators? Do they apply to the value, merely emulating real bitshifts, or do they apply to the bits themselves? Are there any other … | |
Hi I have an old inherited file with c code (visual studio 6). I compiled this file in Visual C++ 2010 (I made an empty project and a win32 console application) and was OK. But when I did the build to make the .exe then the linker throws errors. I … | |
I was wondering if it is possible to move the mouse in C++. Like get the coordinates and move the cursor. Maybe it's not possible but it would be cool. thx | |
I'm new to using vectors and some may see this as a trivial problem. If you have any suggestion on how I can improve the program, I welcome your input. code(with problem): [CODE] #ifndef CMONOPOLY_HPP #define CMONOPOLY_HPP #include <vector> #include "head.hpp" namespace CMonopoly { class CMonopoly { public: ~CMonopoly(); void … | |
I created a program which outputs a y coordinate based on a value of an x. Here is my code. [code] double xmax,xmin,xspac; cout << " Input a value of minimum value for x: " << endl; cin >> xmin; cout << " Input a value of maximum value for … | |
So I am sorta interested in viruses. No, I do not plan to make the next conficker or even something that will trash my brothers PC. But I want to learn about how they work. What they do that makes PC's let them into their system... So for a first, … | |
how you would compute/denote the time complexity of two loops based on different variables? I understand how to compute the time complexity for a simple loop PseduoCode while X<N { while Y<M { Z++ } X++ } one loop occurs N times - time complexity O(N) the other loop occurs … | |
hi all, i can't do the programme in c++ "Write a scanf function in c which accept sentence from user."pls any body reply. thank you in advance | |
Hello everyone! I have here a code with a random-access file that lets you delete and update any information in the file. Please run the file to see what I'm talking about. [CODE] #include <iostream> #include <fstream> #include <iomanip> #include <string> using namespace std; #include <cstdlib> int choice; void displaysmenu(void) … |
The End.