51,593 Topics
![]() | |
Using Dev-cpp, a small program compiles but the resultant .exe file does not run. From the DOS command, it runs. When I try from the windows run command , it flashes but immediately goes away. | |
i have just one question: can a function return array? | |
Hi, Can I check a two-dimensional array like this ? The content of the arrays are of type [I]char[/I] [code=c++] matrix[0][0] == matrix[1][1] == matrix[2][2] [/code] | |
Hey, I am creating a project that writes to a file. The problem is that I don't want it to write to a file on my computer but to a file on my server. I am using this [CODE]ofstream myfile ("www.myurl.com/test.txt");[/CODE] What I want to do is open that file … | |
Hi, I'v tried to compile a small test program with cc/gcc but I'v got the following error: /tmp/ccD16111.o<.eh_frame+0x11>: undefined reference to '__gxx_personality_v0' collect2: ld command 1 exit status I did EXACTLY as in the book. What can I do ???????? [code] #include<stdio.h> int main(){ printf("0"); return 0; } [/code] [email]cvv3@yahoo.com[/email] | |
I know there is [i]a lot[/i] of threads about books but i didn't find what i was looking for:) so here goes. how is the book ^^ made? does it explain the commands? becaus im a bit fed up with tutorials that just say "write this and write that" when … | |
calling C/C++ function from perl from : [email]cvv3@yahoo.com[/email] Hi, how do I call a compiled C/C++ function from perl ? Let say I have a C/C++ function: [code] *char func(char *ptr, int len) { ... return str;} [/code] Now i wonna call it from perl | |
please tel me how to use my classes declarations and definetions in c++ with vb.net | |
I am passing 2 Strings^ from Form2 to Form3 when I open Form3 so I can get these in Form3 in the code below. This works fine. [COLOR="Green"]//In Form2, I pass along 2 String^ to Form3[/COLOR] [code] [COLOR="Green"]//Passing along n1 and n2[/COLOR] Form3 ^form3 = gcnew Form3 ( Convert::ToString(n1), Convert::ToString(n2) … | |
I have a wstring variable which holds a value of a time("20090106103842") in the format YYYYMMDDHHMMSS. How can I convert it to a time_t format | |
I have tried everthinh and cannot get rid of this. PC Tools and Symantec will lock up once they hit the prunnet.exe file. I am starting to get all kinds of pop up that I don't want. P,lease help this is driving me nuts.. Any help would be greatly appreciated. … | |
I am just curious, just how much of math do one really needs in order to make, say space invaderes, or pacman....WOW,..NBA LIVE 2009? It's not that i am bad at math or anything, in fact I am pretty good at it and still learning, calc.II. BUt i am curious, … | |
Hi, I'm programming a simple line editor but I'm running into 1 issue that I just can't seem to figure out. I'm not the greatest at C++, if somebody could have a look I would be grateful. Basically I have this Main... [url]http://pastebin.com/m6e249679[/url] Then I have this source file... [url]http://pastebin.com/mdb671dd[/url] … | |
Hello It would be great if someone suggest me a library for handling configuration files.Is there a general method for this job? PS:i need it for *nix platforms Thanks in advance. | |
I know i can use fstream to create, edit and read files in c++, i also believe there is a different way wich i am unfamiliar with. but is it possible to work with files NOT in the same directory as the program? like if the program is in C:\programfiles … | |
Hello, I'm quite new here, but there's a problem that needs solution. I think the title says exactly what I want to do. I need to use C for a reason I don't think is this important to mention. I tried searching Google, and found the same solution on most … | |
I have created one binary file in c that save btree. File is having huge size around 2GB. If some one changes this attribute to read only, then b tree is updated incorrectly. And the behavior of code changes. I need to write a code, so that no can change … | |
hi, How can i pass a stack to the function. I am getting compilation error. Following is my code. [code] class circuit { public: int append_and_file(stack<int> &); /* Some other variables defined */ } int circuit::unroll() { append_and_file(add_stack_ppi); } int circuit::append_and_file(stack<int> &stack_ref) { int var=0; int num_clauses = 0; stack_ref.push(2); … | |
Hi ! I am creating one application and I want to change the background of my button. How can I change my button background and put image in background ? | |
Hi, i'm looking for some library that provides solving matrix determinant. My matrix contains complex numbers (complex.h). Please write me some hints | |
Hi all, I have tried to write a program which can add two matrix. It is running well....but when I am printing out the resultant matrix it is just showing the address of the resultant elements. For convenience, I have posted the output also. [B]Program:-[/B] [code=cplusplus] #include<iostream.h> int main() { … | |
I tried Googling this to no avail: how can I request the used space/ total size of the hard drive? In this case it is safe to assume that the machine will be running Windows. | |
This is my first C++ program that I put any serious effort into. You may have seen the trick that allows you to start explorer.exe as the SYSTEM user (by running "at /interactive xx:xx explorer.exe", adding 1 minute to the current time). It takes a lot of jumping through loops, … | |
Hi, I have a problem with the use of vectors. As you can see, the program asks the user for a row of positive whole numbers. These numbers will by put in a vector called "getallen". Than the numbers in "getallen" will be sorted by the function "sorteerint" and number … | |
Hi there. I have to modify some variables stored in a pointer say xx. From VC++ debug Watch Window, I can expand xx to several data ([yy], _a1, _a2, etc). So, when I add xx->_a1=0.22 (it is a double type), it is OK. But, when I try to do xx->yy=0.34 … | |
hi, i need some help with adding numbers in array. the arrays are the same size, but the new array must be the same size as the first two. i know how to add two arrays but i don't know how to make the case for bigger size and say … | |
hello, i'm trying to to get the time of my sorting function in seconds, and i always get ZERO time. here is what i'm using: [CODE=C]clock_t t1,t2; t1=clock(); clock_t IT I.insertion(A,200000); t2=clock(); IT=((t2-t1)/ CLK_TCK)*10000000000000000000;[/CODE] i print the IT and get ZERO. can someone help me with that issue? | |
#include<iostream> #include<fstream> #include<cmath> #include<iomanip> using namespace std; /* 215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^1000? */ //my logic is to export 2^1000 into a text … | |
Hi. I have a problem with my SDI application. When I start Telnet, I can connect or disconnect to my server app with no problems, but when I send something to it.....nothing happens. I have an OnRecieve() function in my custom socket class so I can't understand where my mistake … | |
Hi, I have to call an external executable program (prog2) from within my program (prog1) and then use the output of that exceutable program (prog2) in program (prog1) after calling it. I have to manipulate the output obtained from progam (prog2) in program (prog1) and then perform this iteration n … | |
Can someone give me a link to a good tutorial or something on C++ Winsock FTP and HTTP communication. I know how to use TCP/IP, but when you connect straight to an IP, they have to be connected to the same network your on for it to work. If you … | |
I use the Dev-C++ compiler on a Toshiba laptop running on Windows Vista 32-bit. Im good in C++, and I have been learning to use the OpenCV (Open source Computer Vision) library with C++. When I run my C++ app, the OpenCV window that uses GUI freezes up. It shows … | |
I have a rather simple question, and I' ve been looking for the answer for awhile, but did not find any. So I would like to know, what is the proper way of deleting a pointer. For example I have a class with some kind of array, which I want … | |
Hello everyone, I really want to know what should I do first in making games using c++. We all know that c++ is the most widely used programming language in making games. But, there is still things which are not clear to me as of now. I'm still a newbie … | |
I'm having a problem on how to create a program on c++ that creates its own file and storage capabilities. I'm planning to have an interface like this so I put a little detail about the program just to give you the idea of what I actually mean... it goes … | |
I'm looking for some help with some C++ code. I have working knowledge and understanding of code and coding in general, but don't actually program myself. I have 2 files TFGame and TFMenuConsole In TFGame I put [CODE]var config bool ToggleWarhead;[/CODE] and later put [CODE] PlayInfo.AddSetting(default.GameGroup, "ToggleWarhead", default.SIGPropsDisplayText[i++], 0, 1, … | |
You are able to hide the desktop icons on xp by right clicking on the desktop and choosing to hide them, but how would you do it through c++? I was messing around with DestroyWindow and ShowWindow, but I cant figure it out. Any help? WinSpector is telling me that … | |
#include<iostream.h> #include<conio.h> void main() { int n,i,j,t,s; clrscr(); char sname[30],rating[60]; cout<<"enter no of songs in the list"<<endl; cin>>n; cout<<"enter song name and rating"<<endl; for(i=1;i<=n;i++) { cin>>sname[i]; } for(i=1;i<=n;i++) { cin>>rating[i]; } cout<<"The top songs are in the order:"<<endl; for(i=1;i<=n;i++) { for(j=i+1;j<=n;j++) { if(rating[i]<rating[j]) { t=rating[i]; s=sname[i]; rating[i]= rating[j]; sname[i]=sname[j]; rating[j]=t; … | |
I am trying to figure out for my physics simulator how to give my object name a variable or something, ill show an example and the compiler flags it an error but all i am trying to do is pass it the value not the variable long atomID = 0; … | |
I was working with some c++ code from a site. When i try to link in dev c++ I get this. [QUOTE] [Linker error] undefined reference to `GameEngine::m_pGameEngine'[/QUOTE] The code compiles perfectly but does not link. [CODE]class GameEngine { protected: // Member Variables static GameEngine* m_pGameEngine; HINSTANCE m_hInstance; HWND m_hWindow; … | |
//cube.h #ifndef CUBE_H #define CUBE_H class Cube { public: Cube(); ~Cube(); void setSide(double s); double getSide(); double Area(); double Volume(); void Properties(); private: double Side; }; #endif ´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´ #include <iostream> #include "cube.h" using namespace std; Cube::Cube() { } Cube::~Cube() { } void Cube::setSide(double s) { Side = s <= 0 … | |
Hello, I am a new beginner to c++. I am trying to launch an application in using the following command: system("clip100.txt") File clip100.txt got opened on my word processing software running and i had to exit from word processing to get my program continued. My question is: How can i … | |
Here is my code that i am working on. Upon running the exe, it asks the user for a temporary password. After that, the screen saver pops up. Upon exiting the screen saver, the console will ask you for the temporary pass that you entered in order to renable the … | |
Hi, It's me again with another silly question:) I was wondering if there was a way using ofstream to not erase the contents of the file it is writing to and simply write at the end. Thanks! P.S. I'm using windows XP and Dev C++ | |
If you recall in the implementation of list: struct list_node_base { list_node_base* next list_node_base* prev ... [B]void hook(const list_node_base*);[/B] .... }; I wanted to look under the hood of the [B]hook[/B] function, but can't find it anywhere in the STL library or any reference to this method via Google for … | |
HEADER; I am noob in programming, so keep it simple thank you :) I use VS 2008 pro SP1 OS is vista Ultimate x64 SP1...(SP2 beta I will try later) Which function is better and what are differences? 1. system () 2. CreateProcess () ...is there more choices? My goal … | |
i'was asked to develop chat application using c++ anyone can help me finding tutorials/ articles/ walkthrough or what ever i can get that discuss this topic | |
Hello everyone... Recently, i tried making a puzzle solver. And it came out perfect. I wanted to try somthing harder so i went on to a sudoku puzzle solver. You see i checked a bunch of places and found that the best and easiest way to do it is with … | |
Hey guys. Another problem : ( Well you see, i was attempting to make an array that stores char's in a lets say 10 by 10 grid. Then i can display it Example: [code] char array[10][10] = { "----------", "| |", // ...... ext... "----------" }; for(int y = 0; … | |
Hi, I'm a newbie in C++ and i'm working on a project, but it doesn't work.. The C++ program should read numbers into an array, the numbers are in a txt file. Each array number : ex. array[1], array[2], array[3]... should get a number from the txt file. In the … |
The End.