49,761 Topics
| |
I am fairly new to c++, and I would like to know whether or not I need to have the library files present on the system to run a compiled program that used the library files to compile on a different system. Thank you. | |
[CODE] int main(int argc, char* argv[]) { std::cout << argc << std::endl; } [/CODE] The code above will print a number depending on the number of arguments added to it. However I am writing a game in c++/python and I need the program to accept a integer argument that will … | |
Allrite so I'm writing this program - and I've been having some trouble with it - there are three parts to it 1. Write a function [CODE]void tolower(char* s)[/CODE] that replaces all uppercase characters in the C-style string s with lower case letter. - Two helper functions to use a)[CODE]bool … | |
Dear Friends: I am having trouble with this exercise. I was able to compile and create the list 0-7 and reverse. I am not sure where I went wrong. Thanks Danni #include <stack> #include <iostream> using namespace std; template <class stackType> void reversedStack(const stackType & originalStack, stackType &reversedStack) { stackType … | |
| I am getting a "misplaced break" error from this part of the code,the following is a part of the mfile function,the while loop should break if the entered string in temp equals to the one in exit....I don't know why it shouldn't work,any help?Thanks. [CODE] ofstream myfile; myfile.open(fn,ios::ate); cout<<"File has … |
Hello I have a problem. I have a project that consists of 4 forms(Form1,Form2,Form3,Form4). I usually debugged this project. Now I might have done something stupid. I deleted the all 4 .h files. I did keep Form1.h file because I was doing a small program out of that file and … | |
Now make a program so that it stores the values in increasing order, i.e., each time a value is added it is placed into its proper position in the list. Here is my code, I cant get it to put them in increasing order. [CODE] #include <iostream> using namespace std; … | |
I have created a C++ Win32 Dll. I have created a .def File which contains the names of the functions in Win32.Dll As: 1Win32.cpp includes a class library file named gs.tlb It has functions named sum, strupper 1win32.def as LIBRARY "1WIN32" EXPORTS sum strupper When i try to register the … | |
Hi All, I am a software developer C/C++, not expert in network programming but did a little bit. I work as s free lancer and have been tasked to implement UDP server (Broadcaster) over internet (Server machine has Static IP assisgned by ISP so reacheable from any part of world, … | |
Hi, I'm having a strange problem with my linked list program. This is slightly embarrassing because I'm getting back to coding in C++ after 4 years and don't remember much. This is the code [CODE]#include<iostream.h> #include<conio.h> #include<string.h> void printList(struct node *&); struct node { node* next; int data; }; int … | |
Having got the old program to work (more or less) as a Console application I have now turned my attention to making it work as a 'proper' program. My first attempt was to generate the 'Hello World' string as a message box. I found I had to cast the second … | |
We need to combine this two codes to create a game in which we have to count how many times we pressed enter for a matter of time. we need to display the instructions above and how many times we hit or pressed the enter button and also the time. … | |
Hey guys, I'm making a global operator, and I have a line where I'm comparing a std::string::difference_type to a std::string::size_type, I think the difference_type is usually a signed integer, and the size_type an unsigned.. Any ideas for an algorithm change? Also, there is a lambda function used I would like … | |
I have a [B]C++[/B] program written using [B]Eclipse CDT[/B]. This program needs arguments to be passed to it. How can I do that using Eclipse CDT? Thanks. | |
Why code: [CODE]client->Credentials = gcnew NetworkCredential("username", "password");[/CODE] doesnt work for me? [CODE]Error 1 error C2061: syntax error : identifier 'NetworkCredential' [/CODE] | |
I am disassembling an exe file trying to find out how some parts of it work so we can make an easier modification then the current system works (which is just copy and overwriting files). I found some functions in there that refer to a MPGameSetupPage.cpp (which obv i can't … | |
[CODE] //file included from main.cpp #include <iostream> #include <ctime> void generate(int height, int width) { int i,j,random,x,y,check; char map[height][width]; bool way[4], border[3]; srand(time(NULL)); //[error 'srand' was not declared in this scope] for(i=0; i<height; i++) { for(j=0; j<width; j++) map[i][j] = 178; } x = rand()%height; //[error: 'rand' was not declared … | |
I'm creating a voting program in which you input the persons name and how many votes they have received. It than prints out the persons name, their amount of votes and the percentage of their votes from the total. I can't seem to get the percent of total to work … | |
Is their ANY way to do something like: [code] for (int x=1; x<3; x++) {string MyArray[1][x]={"-"};} [/code] Assuming the array has already been defined? I really don't want to have to do: [code] MyArray[1]={blah} MyArray[2]={blah} MyArray[3]={blah} etcetera etcetera [/code] I'm not necessarily looking for efficiency but seriously, initializing 50 arrays … | |
Hi, i want to be able to do this: bmpPicture = OpenPic->Execute(); i want to execute open pic, this will then allow the user to choose an image they want to load. Then get that data and store it into bmpPicture, so that i can then send bmpPicture into something … | |
Hello. I'm a total noob to C++ and MFC, I've been teaching myself from books and it's not going too well. I've been asked to create a test application for a controller. The controller consists of six joysticks connected to a digital I/O board that's connected via USB. I managed … | |
Hey guys, I just started to try and use OpenGL and I wanted to run an example but I get linker errors. The code is just fine but it has linker errors says the console. Linker Errors/Console: [CODE] [Linker error] undefined reference to `glFinish@0' [Linker error] undefined reference to `wglSwapBuffers@4' … | |
hello I'm new to this and will like some help. I will like to create a visual program with to command buttons, the first to open a file by having the user choose the file and the second command button is to open the file and read in the text. … | |
Hey. I am writing a program with menu using curses.h. It works well BUT stuck when i add info(e.g. name, author). I rack one's brains a lot but have no idea why it happens. P.S. interesting thing. If you add after line 60 system("cls"); it will works, but if you … | |
Let me start off by thanking the individuals who have helped me before on other projects, you are awesome. Now on to my new issue. We are learning STRUCT in our new assignment. I had an issue before that was resolved by using a call by reference instead of value. … | |
Hello guys. I have a matrix with char. [CODE] #define MAX_CHAR 128 #define MAX_SIRURI 10 char siruri[MAX_SIRURI][MAX_CHAR]; [/CODE] I must read the number of strings ( [B]n[/B] ), and after that, to go through each string. I must read each string, after that, to show it, and to find for … | |
[CODE] #include "includes" int main() { time_t rawtime; struct tm * timeinfo; char buffer [80]; time ( &rawtime ); timeinfo = localtime ( &rawtime ); string timetest; timetest= strftime (buffer,80,"%Y-%m-%d",timeinfo); puts (buffer); } [/CODE] now instead of print the time i want add the value of the time to a … | |
I'm wondering what is the proper way to point at an overloaded function. Is it correct to cast the function to the proper type? [code] #include <iostream> int double_it(int x) { return x * 2; } int double_it(int x, int y) { return (x + y) * 2; } int … | |
Hi! I develop the app, that must be binded to hardware-specific information. This is a part of license protection scenario. The serial number of motherboard must be obtained. How to do it under Windows ? | |
I am trying to drag a program originally written in Borland C version 3 into the light of the present using Visual C++ 2010. I have a curious, apparently simple, problem. The program read data from a file. I can create a noddy program that opens and reads the contents … |
The End.