49,761 Topics
| |
Does endl do the same thing as %n in java and print the platform dependent end of line ('\n', \n\r' or '\r')? If not then is there anything similar in c++. | |
hii i just downloaded a dev c++ compiler...& wrote the basic hello world program...whenever i try to compile ..my quickheal antivirus deletes it as a trojan...please help..i reinstalled it but gives the same result | |
hey everyone ok so i have reached another road block any pointers are much appreciated the program will not compile due to eclipse not liking the int Password::passwordNumber(int i); int Password::passwordCapLetter(int i); in the .h any ideas demp.cpp [CODE] /* File Name: Demo.cpp Chapter No. 12 - Exercise No. 12 … | |
[code] main() { int a; a=message(); } message() { printf("\n C language"); } [/code] //what is the output and what return will return to a"; | |
Hi all, Im new to this forum and also very new to C++, Im tring to write something with DirectX, but once I use DirectDrawCreateEX(), VC++ give me: --> error C3861: 'DirectDrawCreateEX': identifier not found My environment is Windows 7, VC++ 2008 Express Edition, Installed DirectX SDK FEB 2010, Any … | |
Hello, I have to do simple program which will be work like Deterministic Finite-state Automaton. DFS will be accept some language describe by regular expression (e.g. (a + b)*). Program will read word from text file and analyse it. If word is acceptable program will give info to user. I … | |
I wrote this distructor one way, but the person who code reviewed it seems to think it's better and more readable the other way. I disagree. It's probably more a matter of preference, but what do you think... [code] RfPrinter::~RfPrinter() { if (!hub_.empty() && !name_.empty()) { clearbuf(rfunitlock); rul_hub = hub_; … | |
I am recently new to C++ and I wondered if someone could show me how to modify my program below. I want the program to test if there is more than 1 day that has the highest rainfall and susequently to output those corresponding days. Than you :) [CODE]#include <iostream> … | |
Hey guys, i am having a problem solving a this part of my coding. Basically, what im doing is for the program to read a string, and if there is a value of 'M', the value of num will go up by 1000. Here my coding .... [CODE] string msg … | |
For example, [CODE]MyClass *stable; if(..){ MyClass temp; stable=&temp; } stable.myVariable;[/CODE] Code snippet above does not work, because destructor of temp object is called. How Can I Increase Scope of "temp" object? Thanks. | |
hello,i am using GetAsyncKeyState() function for a keylogger,but my problem is: how do i test if 2 keys are pressed simultanion. For example: when i press SHIFT and letter 'a' it should print 'A'. Can anyone help me ? thanx | |
Hey guys, i been looking through at questions regarding roman numerals and i have a question. i ran some of the coding which i found and i dont quite understand this part.. [CODE] int number = 3000; int number2 , i ; number2 = number / 1000; for(i = 1; … | |
I'm trying to open a file (ifstream object), read from the file, then pass the ifstream object to a function where it will continue reading from the file. Along the way, I want to store the path of the file, and would like to know if there is a way … | |
Hello, I have to use an array, but its length is unknown at the beginning of the program. Is it possible to create such array and after that give it the desired length? Thank you! | |
hi all, I am working a carbon application using c++ in Mac machine. I want to find the ip address of my machine using code. How can i get this ip address? Thanks in advance and urgent plz... | |
hi i want to call some functions from a DLL(which is provided by a hardware manufacturer without the .lib and .def). I've used these following code HINSTANCE hinstLib; MYPROC ProcAdd=NULL; BOOL fFreeResult, fRunTimeLinkSuccess = FALSE; // Get a handle to the DLL module. hinstLib = LoadLibrary(TEXT("C:\My.dll")); // If the handle … | |
Hello, I am trying to compile this program, however it is giving error Error 2086. Infile Redefinition. Am I allowed to redefine Infile, or I am supposed to use it only once? It might be silly error, Kindly help... Thnaks in advance...[code]#include<fstream.h> #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #define pi 3.141593 struct … | |
Hi, I've spent a lot of time on this program and I'm stuck. My assignment is to prompt for two input strings. Print out each string Concatenate string1 and string2 and store the concatenated string into string3 without changing what's stored in string1 or string2. print out the concatenated string. … | |
I wanted to use a window style that was border-less or had a 1 pixel wide border, but was re-sizable. It was not actually possible so I tried changing the window style with SetWindowLong() then using SetWindowPos() with SWP_FRAMECHANGED and AdjustWindowRect() It allowed me to resize the window but it … | |
I am using VC++ 2008. I want to rotate the Bitmap in my MFC application. I tried the GetPixel and SetPixel functions, but the performance is too slow. There seems no Bitmap rotation example using MFC class on the internet Can anyone give me some idea? Sample code will be … | |
Hey guys, ive been working on this code for the past couple of hours and I am trying to do the following problem. Write a program that reads the le generated by randGen.cpp (in Problem 1) and stores the numbers in an array of type int. You can assume that … | |
I am getting the following error while building the code in VC: error C2143: syntax error : missing ')' before '&' on building the below code: [CODE]typedef unsigned int uint4; void Find(uint4& a, uint4 b, uint4 c); void Find(uint4& a, uint4 b, uint4 c) { . . . . }[/CODE] … | |
Im having trouble opening the .txt file in dev-c++, I've entered the correct name for the .txt file which is saved under the same folder, but whenever I compile and run, it will just show : " Begin reading file. End reading file. --------Welcome------- Please choose: etc. " The .txt … | |
In visual C#, there was this thing where you can add a settings file and refer to a setting in that settings file in your code. With that, I was able to save user settings easily. But I can't find it in C++. Is there no settings file option? If … | |
What up yall, Im working on this program that reads in strings and numbers from text file and store them into an parallel arrays. My program also needs to: "list each sales person ID,name,sales amount, and commissions" "list each month of the year and total sales for the month for … | |
13. What is the output of the following code? int x; int *p; p = new int; *p = 14; x = *p; *p = 65; cout << x << ", " << *p << endl; a. 65, 65 c.14, 14 b.65, 14 d.14, 65 | |
[CODE]#include <iostream.h> #include <conio.h> int main() create s; push (s, '#'); while (not end of infix input) { ch = get char; if (ch is an operand) add ch to postfix expression; if (ch is a '(') push (s, ch); if (ch is a ')') { pop (s); while (ch … | |
Can you please give me sample code of a Win32 console application that will hook to Windows through the API and listen for mouse clicks (all mouse clicks in the OS; not just the clicks on the app's window)? I looked high and low for this, but couldn't find it … | |
I have a weird file i/o or system() error. Here is the deal, I completed an assignment for threaded trees recently. My professor wanted us to turn in own data set we used to test our tree along with the one he provided for us. I thought I'd be fancy … | |
hey guys, i need help with understandind this code-actually just some parts of it. can you explain to me what the purpose of this is: *(float*) variable = 34; i can understand the variable = 34 part just not the *(float*) part. what does it do? also what is the … |
The End.