49,761 Topics
| |
Hello every body I made a small prog. to click mouse , but when i tried to make it parallel using mpi it doesn't work can any body lead me where is the error [CODE]#include "mpi.h" #include <windows.h> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int … | |
I have met a proplem in correcting the following file and please submit to me by correcting the errores and if you can please help me in sorting and updating this file #include <iostream> #include<fstream> #include<string.h> using namespace std; struct gum { string nam,fnam,typ_item,nam_pack,coun_cons; int tin_no,reg_no,tot_item,tot_pack; float weigh; }; void … | |
I'm searching a text document and replacing substrings with other substrings. So for instance: "ra,16([B]sp[/B])" with "ra,16([B]$sp[/B])" The issue I'm having is that say I have the following string: "sp,sp,24" How do I re-iteratively replace "sp" with "$sp" twice without getting: "$$sp,$sp,24" This is my code: [CODE] ... if ( … | |
I've seen that a vector can be sorted using [code] vector<double> V; vector<int> Index; V.push_back(9); V.push_back(10); V.push_back(8); Index.push_back(0); Index.push_back(1); Index.push_back(2); sort(V.begin(), V.end()); [/code] If I want to sort Index according to how V was sorted, there is an optional third parameter to sort() that will do this. I don't understand … | |
Hello. So the most I can tell you is i'm having serious trouble with my code of writing to a txt file. It's not that my code isn't working, it's that c++ is outputting WEIRD crap that makes no logic sense, doing things out of order, and just seriously screwing … | |
I met a problem in sorting a file containing astudents fistnane, secondname and GPA.if I sort the file using first name or lastname their Gpa will be miss placed please help me. the file is: kalayu haile 3.5 fikadu adisu 3.99 eyob assefa 3.25 getaneh allesew 3.75 fraol gezahegn 3.00 … | |
hi.. now i'm trying to use the openfiledialog in a gui app .. what i have done till now is that 1. open visual stdio 2008 2. select c++ project 3. select windows application project 4. drag the openfile dialog from tool box and drop it on the form .. … | |
My question may be funny but i want a right direction so i am posting it. I know fundamentals of c and c++ and i want to go ahead in it. I heard about windows and system programing but i am confused that app like antivirus, process explorer, anti spyware … | |
Is it possible to write a code that prints 'its own code' when executed? Just a thought. | |
If you're doing programs for academic reasons, this is a good site to go for C++ information. Good for snippets. Used it a lot through classes. http://www.mvhs.net/~rkrane/clecs/ | |
Please help me how to use clrscr(); and gotoxy(); functions in other C Compilers? | |
Alright guys I have a question. I am trying to write a custom data type. Let me explain a little further. I'll start out at the base. te_char (you don't really have to worry about this. >char c_char >rgb color te_word (weird part) >int type (based on an enumeration >vector … | |
Here is the code: [CODE]#include <cstdlib> #include <iostream> using namespace std; //Declare function int triangle(int num); int main() { int n; cout<<"Enter a number and press RETURN: "; cin>> n; cout<<"Function returned:"<<triangle(n)<<endl; return 0; } //define function int triangle(int n){ int i; int sum=0; for(i=1; i<=n; i++) sum=sum+i; return sum; … | |
Hello, Ive started to programming a few days ago, I'm totally new never done it before. Ive read through the internet for some knowledge about programming. I used the program code blocks to program yesterday but I got some errors in it so I uninstalled it, it wasnt really errors … | |
I wrote a console calculator application in Microsoft Visual C++ Express 2010 and built it as release. It runs fine on my computer but when I moved it to another it said it needed a certain .dll which was not previously, and said reinstalling the application may fix the problem, … | |
Hi. How can i push into the same vector types of string and integer too ? | |
plz help meeeeeee my program include 5 people that if choise 1-wrte name people 2- ACCOUNT 3-SUPPLY account and with add 1 people choise 1-SUPPLY account 2-update of account plz i can not write plz how i write this program :'( | |
Hi all, My cpp is rusty as all get out and I'm wondering why this doesn't seem to work. I've basically created a .cpp file with all of the structs and lower level data types in it. One of these is an enumerated type. The file. structs.cpp is as follows: … | |
Topic title is not the best but nvm I have been looking for this on internet but cant it find anything useful. [CODE]#include <windows.h> void main() { ShellExecute(NULL, "open", "http://dreamincode.net", NULL, NULL, SW_SHOWNORMAL); }[/CODE] This is function which I have found on net to open URL, problem of this function … | |
hi all, i tried this code, but it doesnt work, it says vector subscript out of range: (sorry, i just dont understand how to correctly post code, if someone could tell me, please?) #include <iostream> #include <vector> using namespace std; vector<int> v; v.push_back(1); v.push_back(2); if (2 < v.size() && v[2] … | |
Here are my instructions and I think I have it done but I just realized I need to use memory mapped IO. I am reading over the book and doing research on it but just dont know how to change it and my deadline is Friday. Can someone take a … | |
I made a c++ program. I used cin.getline() function so I could input a string from the user. But when I run the program it does not input anything nor gives me a change to input anything instead it goes to the next statemement. For eg. this is my program … | |
What's the difference between return (0); and return 0; | |
I'm knew to C++ and I always seem to have a problem but all I want to do is to pass an Object to a function by reference.. Thanks in advance Oh I user boost for directories, paths and files... Also I use c strings for UserName and password as … | |
Hi, How to get the default Web Browser location in vista & windows7 though programming. | |
Hello. I have a little problem with using a .dll in my visual studio 2008 project. The dll is created by bjam. The guide i followed was: [URL="http://www.rasterbar.com/products/libtorrent/building.html"]http://www.rasterbar.com/products/libtorrent/building.html[/URL] There is also a vs 2008 guide but i do not know enough about visual studio to follow it. [URL="http://code.rasterbar.com/libtorrent/wiki/BuildVS2008"]http://code.rasterbar.com/libtorrent/wiki/BuildVS2008[/URL] Well i … | |
It won't let me build my project. It's just a simple one file thing since I am just learning. When I click build or debug it prints "Launch failed. Binary not found." What do I do? EDIT: I am on a mac. | |
I need a way to communicate with other exe's. Almost like being able to call cout but to a exe, not the output stream. Both of the apps would be in c++. I know cout is for output stream, sstream is for any stream, fstream is for files, something like … | |
In simple terms, to write windows DLL I have to define DllMain and do switch stuffs and then export functions using __declspec(dllexport). If I'm right the question comes what about linux? I want to write it in ubuntu box and I'm stucked! How do Coding DLLs differ from .SO? Thanks! | |
I am using Visual C++ 2010 and created a CLR EXE debug project and wrote a function, which I am able to call from main in my program. If I take the exact same code and put it in a dll, then I get a compile error from the line … |
The End.