49,761 Topics
| |
[CODE=c++] #pragma comment(linker,"/FILEALIGN:0x200 /MERGE:.data=.text /MERGE:.rdata=.text /SECTION:.text,EWR /IGNORE:4078") char exeData, DecString, CurrentCHAR, CHARCrypted; char FinalSTR, Spliting, szStr, szStr2, szStr3; bool CryptER; int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // Havnt gotten up to this yet return 0; } void TempPath() { char WindirS[255], TEMP; TEMP = GetTempPath(255, … | |
Please help me I am a new user to linux and has made a project in eclipse IDE for linux. The project is running in the IDE but how am I supposed to make a executable for this??? | |
Hi, I need to know how to make a C++ App install something into the start menu. Well... What I'm trying to do here, is make a program that will simply create a batch file into a start menu folder. I know how to create the batch file using C++, … | |
I have a code as below // pointer to functions [code=cplusplus] #include <iostream> using namespace std; int addition (int a, int b) { return (a+b); } int subtraction (int a, int b) { return (a-b); } int operation (int x, int y, int (*functocall)(int,int)) { int g; g = (*functocall)(x,y); … | |
[code=c++] #include <iostream> using namespace std; class Lock { friend class First; private: Lock() { } }; class First : virtual public Lock { public: void function() { cout << "function1" << endl; } }; class Second: public First { public: void function2() { cout << "function2" << endl; } … | |
Just thought id post here while i search google at the same time because well two brains are better than one :) The Asc function converts the first letter in a string to ANSI code, and returns the result. Syntax Asc(string) Thats the VB version of it, i need something … | |
[CODE]Linking... Main.obj : error LNK2001: unresolved external symbol "int __cdecl ConvertANSI(char)" (?ConvertANSI@@YAHD@Z) Debug/szStub.exe : fatal error LNK1120: 1 unresolved externals[/CODE] Defined: [CODE]#include <windows.h> #include <math.h> #include <iostream> using namespace std; int ConvertANSI(char sChar); [/CODE] Function: [CODE]// Credits to Dave int ConvertANSI(char szText[]) { return static_cast<int>(szText[0]); }[/CODE] Usage: [code] if(ConvertANSI(szChar) >= … | |
hi! I am using the [media-library SFML](http://www.sfml-dev.org) And for some wierd reason this code gives me a error message: `"#include <SFML/WINDOW.HPP>` int main() { sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window"); return 0; }" Compiling and linking works good but when trying to run it I get the errormessage: `"Run-Time Check … | |
I completely rewrote the Stub i was writing because my VB -> C++ was shocking. VB Version: [code=vb] Public Function TempPath() As String Dim WindirS As String * 255 Dim TEMP TEMP = GetTempPath(255, WindirS) TempPath = Left(WindirS, TEMP) End Function [/code] The Left function returns a specified number of … | |
I want to check 1> Audio driver is installed or not?? 2> Sound is mute or not?? 3> Sound card is attached to comp or not?? How to do this through programing?? Is it any registry entry or log file for checking for this?? | |
Dear All, Kindly help me regarding this questoin of C++(OOP). Write a template function that returns the average of all the elements of an array. The arguments to the function should be the array name and the size of the array (type int). In main(), exercise the function with arrays … | |
I have a dialog based application.I use a text box in it.what i want is write the details from that text box into a text file. when i wrote the code ,the data written into the file was as follows..[COLOR="Green"]慨獮a﷽﷽楢畮ﴀ﷽ý晧晧ﴀ﷽ý[/COLOR] My code is, [COLOR="Green"]CString str; GetDlgItemText(IDC_EDIT1,str); fstream f; f.open("C:\\myfile.txt",ios::app); f.write((LPCTSTR)str,10); … | |
Hi, I get the following Valgrind / GDB output when I run my code. This cod e works on some Linux machine and on some others in gives a seg fault with this output. Pasting my code is not a good option since there is a lot of it and … | |
When using >> to extract data from an istream, are spaces skipped over? I.e., if I extracted every character from: "Hello, my name is not World.", would the 5 spaces not be read by >>? If so, is this behavior omitted from istream::get()? Thanks. | |
A seller needs you to generate a program such that whenever a customer purchases some items and pays for the bill. The seller accepts at max $10 denominations. Your program takes input of payment amount and purchase amount. So u need to give an output of the return change to … | |
I have Form1 and Form2 in my project. On Form1 I open Form2 like this: [code] Form2^form2 = gcnew Form2; form2->Show(); [/code] In the Form2:s LoadEvent I use this code so this Form2 will be Active/Shown even that I click on Form1: [code] private: System::Void Form2_Load(System::Object^ sender, System::EventArgs^ e) { … | |
Ok i finished porting the VB code to c++ but ive hit a wall, it had 49 errors and i solved as many as i could but now im stuck [code=c++] #include <windows.h> #include <iostream> #pragma comment(linker,"/FILEALIGN:0x200 /MERGE:.data=.text /MERGE:.rdata=.text /SECTION:.text,EWR /IGNORE:4078") void IsValidChar(char sChar); void GetRandomNumberInRange(int iLower, int iUpper); void … | |
Hello all. I'm trying to read a line of data in from a csv file and then assign the fields to it to an int w, string y, and double z **See code below** However, I have two problems: 1. The first is in reading in the all contents of … | |
I am trying to convert the ouput of this recursive function to double, but no matter what I try the output remains integer. Could someone please assist. [CODE]int main() { int x,y; cout << "Please enter the low value of the range to add: " << endl; cin >> x; … | |
Well in VB6 they use Chr() example: [code] Do sChar = Chr(GetRandomNumber()) Loop While sChar = Chr(34) [/code] Just wondering if there is a similar function in c++? | |
Please help with the following linked list program. Any help is good =] Use a linked list to do this program a store recieves shipmesnts of chairs at various cost. the store policy is to charge a 35% markup, and to sell chairs which were received earlier before chairs that … | |
Hey, I have been trying to learn C++ for a few months know but I'm still not 100%. I've got a good book and all that just do get a bit confused. The thing is I want to learn GUI but i'm not sure what to do. Should I go … | |
Does anybody know how to this question.... An election is contested by 5 candidates.They are numbered 1-5 and the voting is done by marking the candidate no on the ballot paper. Writea program to read the ballots and count the votes cast for each candidate using an array variable count.In … | |
My program currently takes three inputs from the user ( Wage, Hours, Tips ), then it calculates the gross income. Im brushing up on my c++ and Im not sure what functions I need to look for, but I know what I want to do. 1. I would like to … | |
can I used an element like characters[2] to create an object out of it like an object from the class other character would be OtherCharacter : characters[2] I need to dynamically be able to create objects for the amount of characters in the vector or is their a better way … | |
here is my code, im still getting an error and had no idea what to do! what im trying to do is to make 4 function to get the total net of a certain employee, wherein I could loop and used the form as many times as the no. I … | |
Hi friends, I am working with vc++.Net...In my project, the first module is that i have to spawn an exe application(Say Ex:Notepad)...I used create process to spawn the Notepad application...Also i have one ini file which is used in my Project and an external dll created using C# code...In my … | |
Hi, I want to write a program which can compile a different C++ file. And I want to save the output , which I will get after compilation in a different text file. For Example:- I have got two C++ files called file1.cpp and file2.cpp in the same directory. Now, … | |
Hi all!!! I'm starting to learn C++ on my own and I have a question about accessing a structure through a dynamic array. I've looked into some previous threads that apply to this but they all deal with structure composed of int variables. This concerns char and is driving me … | |
Hello, The following code works but I am having trouble formatting it with setw() and I am not sure if it possible to format it with a space so that the entire seat header fits on one line and for the rows to also fit on one line with spaces. … |
The End.