49,761 Topics
| |
I have been trying to write this code that calls a text file in the command line, it then reads the file and if the file has integers that look like this (1+2+3+5)it takes there sum and outputs it into a different text file, if it looks like this (1+2 … | |
I'm used to c++ along with an open database (switched from mysql to postgres not too awful long ago.) A new job I'm looking at taking focuses heavily on .net along with SQL Server. As such, I've been looking into the .net framework and what I can't seem to figure … | |
Hello, This is my first time using vectors. The code below creates a vector of size 30, but when I run the program (which loads 30 integers into the vector), the last integer in my data.txt file does not load into the vector. When I use a vector of size … | |
[size=10]The problem is the below code.. I created my controls.. The thing is that when I press the button, the edit control shows up on top of all controls except for the button that was pressed.. then if I move the mouse, all the other buttons under it, show up … | |
I was wondering if anyone could help me compile code which will actually work for my comiler. I've found many examples and two good references for... keyboard [url]http://www.codeproject.com/KB/system/keyboard.aspx[/url] and mouse [url]http://msdn.microsoft.com/en-us/library/ms646260[/url] ...but have never actually gotten a working version to run and therefore haven't been able to fiddle around with … | |
| I am trying to write a multi-window text editor. I have a Page Control containing 20 pages, and each page (tab sheet) contains an instance of my editor. Which works mostly ok, except I sometimes get weird results when painting my editor window. The attached code is a greatly cut-down … |
I am trying to run what i thought was a pretty basic program to solve a problem concerning strings (besides the point). It turns out that my algorithm works properly but i am stuck on a detail; the following segment of code is the problem: [CODE] int cases; string line; … | |
I posted a while back ago on making directx work in classes. I'm having more issues now. On line 125 (system.cpp), when in debugging, it tells me that it has an access violation. I googled the issue, and someone had said something about initializing the pointer, but that is taken … | |
i have tried to write a code, but i have a problem with the play() module where the message "one Row Completed" is not being displayed. Please help me with this:icon_confused: [CODE=c++]#include<iostream.h> #include<conio.h> #include<stdlib.h> class bingo { public:int a[5][5]; void input(); void check(); void play(); void comp(); }; void bingo::input()//input … | |
[CODE]#include <iostream> #include "stdlib.h" using namespace std; struct var{ int a; int b; int result; }; void adD(var&); int main() { int a; int b; cout<<"please ente the value a ==== "<<endl; cin>>a; cout<<"please ente the value b ==== "<<endl; cin>>b; var v1; adD(v1); system("cls"); cout<<"the value of result == … | |
I have this code for solving eight queens problem. There are 92 solutions but there are only 12 unique solutions by rotating/inverting. I cant seem to figure out how to make the program show only 12 unique solutions. Can someone help me getting that code? [CODE] #include <iostream> using namespace … | |
This is my code.... [CODE] #include<iostream> #include<conio.h> using namespace std; int main() { int t,i,j,k,m,n,o,q=0,a,b,c; cin>>n; cin>>k; i=n+1; j=k-1; for(a=n+1;a<=k-1;a++) { for(b=i;b<=j;b++) { m=a*b-n; n=a-n; o=b-n; t=n*o; c=m%t; if(c==0) { m=0; n=0; o=0; q++; } else { m=0; n=0; o=0; break; } } } cout<<q; getch(); return 0; } [/CODE] … | |
Hi, i am trying to merge Folders into File.extension and i was wondering how would i be able to do this. Basically i am trying to merge all files in a folder to one File.extension, for example: i have folder called Client, i have few files in Client folder: Notice.inc, … | |
I am currently studying C++. I have an assignment of which I have completed. but need to verify if I'm on the right path with my answers. I have attched the assignment question herein. Thank you guys, you are far to kind.: | |
I have to get this program to read from a text file and write the data to another text file. The problem i'm having is the format. It's typing everything on one line [CODE]#include "stdafx.h" #include <iostream> #include <fstream> #include <iomanip> using namespace std; //reading data from a file int … | |
Hi all, I'm just working on a little Allegro 5 puzzle game for a bit of fun and practise between jobs. Anyway, I have a bit of an optimization issue. It's a board based game where you have an 8x8 board with each square having a value of 0-3 representing … | |
What will happen? Here's a code that i tried, it works but i don't really get what's actually happening or how many instances of the static test t are getting created. [CODE] #include<iostream> using namespace std; class Test { public: static Test t; void hello() { cout<<"this line shall be … | |
How to do graphics in visual c++. Is it possible to run a graphics program in c++? | |
Hello, currently new to C++ and learning the ropes. I'm trying to create a simple database-like program, but the following code doesn't output any meaningful data. The program compiles fine, though. The rest of the program is still under work, so I'm just posting the relevant parts which I think … | |
I'm working in this project that has a feedback form and in this feedback form there is only body, so it doesn't ask for subject and who it's from. And all the messages send from will go to a custom mail account, for example [email]Example@custom.com[/email] How can I do this … | |
Kk so I've been using these functions for quite some time and everytime I write a new program and decide to use them, I have to open up old ones and copy paste them with a whole bunch of include n crap. I decide I'd try to make a DLL … | |
This code: [CODE] int array1[5] = {1, 30, 90, 40, 3}; char array2[] = {125, '}'}; cout << array1 << endl; cout << array1[0] << endl; cout << array1[1] << endl; cout << array1[2] << endl; cout << array1[3] << endl; cout << array1[4] << endl; cout << array2 << … | |
I'm very new to programming and I'm trying to make a program to compute the circumference of a circle when you give it the radius, but I keep getting "fatal error LNK1169: one or more multiply defined symbols found" whenever I think I fix it, it just says the same … | |
hi all guys, I have just started CURL programming in vc++.But I don't have a good place to start reading more about it.I do understand the basics of it,but I want a procedural tutorial to learn more about it. Is there any proper site to learn from basics to higher … | |
hi i got a problem when try to use pointer and struct..somehow ive manage to compile my coding but the main prob is that the output is not what ive keyed in.. [CODE]#include <iostream> #include <conio> #include <string> #include <stdlib> void printtable(); void input(); void calculate (); void scorecard(); void … | |
Hi! I have recently started using linux and I was recommended gcc compiler. I have written a basic program just to see if it works. And it doesn't. I am trying to compile it with Terminal, and with the following command :[CODE]gcc ~/Desktop/C++/test.cpp -o testing)[/CODE] My program it responds with: … | |
-First post Woot!- Alright, here's the problem; I'm building a _very_ simple Terminal-like program. The only problem is that in a normal Terminal (be it in Linux or Windows' "Command Prompt") there is no definitive number of inputs that you can input, for instance; you can either type "dir", or … | |
Umm I created a code which will create many results with specific ints(integers).I use Code::Blocks as my compiler.The code works inside the compiler,but when I go to the saved folder and run the batch file this is what happens-I enter a number and press enter and it simply closes itself!@What's … | |
VC++ 10 gives error when libraries and headers related to libcurl are added to project.Even if curl.h is not included in the code, C2065 undeclared identifier _SH_DENYNO //this is in xiosbase... the above error comes. Is there a problem as there is no libcurl version for vc++ 10? ....libcurl works … | |
So, I want to save an HBITMAP to different image file formats like BMP,PNG and JPEG. I believe that the most simple way to do it is by using GDI+. So here is what I came up with. [CODE]Gdiplus::Bitmap bmp(hbmpImage,(HPALETTE)0); CLSID pngClsid; GetEncoderClsid(L"image/png", &pngClsid); bmp.Save(L"D:\image.png",&pngClsid,NULL);[/CODE] The problem is that it … |
The End.