49,761 Topics

Member Avatar for
Member Avatar for johndoe444

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++.

Member Avatar for Narue
0
72
Member Avatar for prade

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

Member Avatar for Ancient Dragon
0
167
Member Avatar for theABCasian

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 …

Member Avatar for mitrmkar
0
171
Member Avatar for sejalpastagia

[code] main() { int a; a=message(); } message() { printf("\n C language"); } [/code] //what is the output and what return will return to a";

Member Avatar for Ancient Dragon
-1
105
Member Avatar for Ginkan

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 …

Member Avatar for kenji
0
82
Member Avatar for natomiast

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 …

Member Avatar for donaldw
0
128
Member Avatar for ischuldt

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_; …

Member Avatar for Fbody
0
134
Member Avatar for allaboutdrew

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> …

Member Avatar for gnarlyskim
0
119
Member Avatar for gregarion

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 …

Member Avatar for gregarion
0
232
Member Avatar for metdos

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.

Member Avatar for mattjbond
0
174
Member Avatar for vbx_wx

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

Member Avatar for Narue
1
148
Member Avatar for gregarion

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; …

Member Avatar for metdos
0
103
Member Avatar for 42Wired

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 …

Member Avatar for 42Wired
0
318
Member Avatar for miskeen

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!

Member Avatar for miskeen
0
15K
Member Avatar for chidambaram

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...

Member Avatar for samar ihab
0
302
Member Avatar for sam1900

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 …

Member Avatar for Banfa
0
161
Member Avatar for wtvrinc

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 …

Member Avatar for Banfa
0
279
Member Avatar for myluvstefan

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. …

Member Avatar for mattjbond
0
336
Member Avatar for VilePlecenta

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 …

Member Avatar for VilePlecenta
0
180
Member Avatar for LemonLemon

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 …

Member Avatar for mattjbond
0
131
Member Avatar for theblastedfool

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 …

Member Avatar for mattjbond
0
214
Member Avatar for rkp728

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] …

Member Avatar for mattjbond
0
73
Member Avatar for Izzy123

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 …

Member Avatar for Izzy123
0
146
Member Avatar for CreativeCoding

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 …

Member Avatar for WaltP
0
133
Member Avatar for jcps65

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 …

Member Avatar for Salem
0
96
Member Avatar for rizzi143

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

Member Avatar for Salem
0
252
Member Avatar for tsy123

[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 …

Member Avatar for Salem
0
148
Member Avatar for mksafi

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 …

Member Avatar for mksafi
0
250
Member Avatar for pinsickle

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 …

0
60
Member Avatar for mani_singh

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 …

Member Avatar for nezachem
0
241

The End.