49,761 Topics

Member Avatar for
Member Avatar for Mena samy

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 …

0
38
Member Avatar for allonline

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 …

Member Avatar for Taywin
0
146
Member Avatar for dansnyderECE

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

Member Avatar for Taywin
0
102
Member Avatar for daviddoria

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 …

Member Avatar for daviddoria
0
2K
Member Avatar for mybluehair

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 …

Member Avatar for nbaztec
0
385
Member Avatar for allonline

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 …

Member Avatar for peter_budo
0
340
Member Avatar for mohamedhassan

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

Member Avatar for jonsca
0
128
Member Avatar for gameon

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 …

Member Avatar for nbaztec
0
94
Member Avatar for adityats2020

Is it possible to write a code that prints 'its own code' when executed? Just a thought.

Member Avatar for nbaztec
0
123
Member Avatar for samaru

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/

Member Avatar for kvprajapati
0
1K
Member Avatar for playagain

Please help me how to use clrscr(); and gotoxy(); functions in other C Compilers?

Member Avatar for karrl
0
313
Member Avatar for argio

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 …

Member Avatar for Radical Edward
0
159
Member Avatar for FudgeCoder

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

Member Avatar for Taywin
0
153
Member Avatar for Galdzor

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 …

Member Avatar for Kanoisa
0
178
Member Avatar for Buolbear4444

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

Member Avatar for venomxxl
0
168
Member Avatar for vbx_wx
Member Avatar for Radical Edward
0
126
Member Avatar for anita_jojo20

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 :'(

Member Avatar for griswolf
0
179
Member Avatar for eggmatters

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

Member Avatar for eggmatters
0
144
Member Avatar for Jeronim

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 …

Member Avatar for Jeronim
0
1K
Member Avatar for bubacke

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

Member Avatar for bubacke
0
129
Member Avatar for jimJohnson

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 …

Member Avatar for Taywin
0
178
Member Avatar for dhruv_arora

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 …

Member Avatar for dhruv_arora
0
110
Member Avatar for dhruv_arora
Member Avatar for ShortYute

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 …

Member Avatar for ShortYute
0
917
Member Avatar for macla
Member Avatar for nbaztec
0
51
Member Avatar for Utte

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 …

Member Avatar for darreno
0
263
Member Avatar for FudgeCoder

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.

Member Avatar for theABCasian
0
122
Member Avatar for mattloto

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 …

Member Avatar for mkvist
0
286
Member Avatar for Stefano Mtangoo

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!

Member Avatar for Stefano Mtangoo
0
143
Member Avatar for twc2102

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 …

Member Avatar for twc2102
0
1K

The End.