51,593 Topics

Member Avatar for
Member Avatar for Covinus

ive been trying to connect my c program and a postgre database using VC++. but i cant compile it because it cant find "postgres_fe.h". and also i cant find any tutorials about this one too. When i searched google, most are for linux. if anyone here knows some links to …

Member Avatar for ~s.o.s~
0
144
Member Avatar for kpillsb39

Need assistance in the assignment on using an Array of structs. I need to know if the array is initialized properly or what i need to do to get it initialized. Some code has been commented out until i get the array initialized. Here is the code: [code=cplusplus] #include<iostream> #include<iomanip> …

Member Avatar for Narue
0
84
Member Avatar for ghadahelal

Hallo, i have a programm, it works without errors , the only problem i have is that the .exe file works for one line and then it closes from itself how can i change this problem. i must give this .exe file in 4 days !! thanks

Member Avatar for Ancient Dragon
0
95
Member Avatar for tformed

I am to create a program in which the user puts in a word and the program displays the definition. The words are 20 words I select. I have a comon idea on how to achieve this, but I never scaned for text before. I know char is for a …

Member Avatar for tformed
0
135
Member Avatar for dev.cplusplus

Hi to all, I was wandering which is the best way to found the closer number in an array. OK not exactly the closer number, I explain my self: For example I have the array: Index: 0 1 2 3 Numbers: 750 500 300 200 * If I receive the …

Member Avatar for Chaster
0
112
Member Avatar for radskate360

My program seems all correct but when I run the program my outputs are all what they need to be but I just cant seem to figure out how to send my output into 5 seperate columns. After reading the teachers notes I am more confused with his explanation on …

Member Avatar for Lerner
0
107
Member Avatar for bops

[code=c] case WM_NCHITTEST: { UINT uHitTest; uHitTest = DefWindowProc(hwnd, WM_NCHITTEST, wParam, lParam); if(uHitTest == HTCLIENT) return HTCAPTION; else return uHitTest; } break; [/code] I came across this code that can be used to drag a window by its client area, which is what I need. However using this code stopped …

0
59
Member Avatar for kinggarden

Hi everybody: I'm trying to do the practices on the top of forum. I started from beginner's level. This time I will show you my solution to implement a simple database in C++. If you could give some advice on the following aspects or other, it would be so nice …

Member Avatar for Narue
0
207
Member Avatar for meiyantao

Hi,sir.I encounterred a person who said that C++ is an unsafe language.I try the follow code ,but when I input an non-int type,the program will fall in a bad loop.(gcc4.1 in Linux) [CODE] #include <iostream> #include <string> using namespace std; class bot { private: int password; public: bot():password(567){} virtual ~bot(){}; …

Member Avatar for Narue
0
251
Member Avatar for alembic21

Hello, I have generated a group of random numbers but I can not figure out how to display the numbers in groups of 4. Any suggestions? [CODE]srand ((unsigned int) time(NULL)); int i, high, low, number; high = 47; low = 19; for (i=0; i<20; i++) { number = rand() % …

Member Avatar for alembic21
0
126
Member Avatar for jaepi

Hello there, is there a scsipt.h version for Linux? I've been looking for this because I really need that header file.

Member Avatar for jaepi
0
45
Member Avatar for CodyOebel

Ok.. Im at work , and dealing with 2300 machines. I need the easiest way possible to get the computers name. for example.. say the pc's name is GA2032d1 I need to be able to simple get that name, and be able to manipulate the characters in it. So for …

Member Avatar for thekashyap
0
79
Member Avatar for nalinibh

Hi everybody, Can anyone among you let me know.how can i find execution time of an algorithm in my c coding!! thanks Nalini

Member Avatar for Ancient Dragon
0
113
Member Avatar for sadaka

I have been stuck on this one problem for sometime now and I have tried looking this up in all my references but was not able to come up with a solution to this error. Can someone help me with it please. My gratitude to you in a thousand years …

Member Avatar for sadaka
0
168
Member Avatar for jenymaru08

please help me i really need this badly i'm trying to write all the possible code but the outcome i needed is not right i write a program that you input a string then the output will be the last letter of you input will come first then follows example: …

Member Avatar for hinduengg
0
100
Member Avatar for gerik

Does anyone know of a "real-world" program with source that has good documentation and comments, so that say an intermediate-beginner programmer could look through it and get a general idea of how these programs are created? By real-world I mean a program that does something, not just show how a …

Member Avatar for Sturm
0
91
Member Avatar for bala24

Hi, I was just browsing through some stuff about Initialization lists in C++ and got stuck with a doubt.. Why is it necessary to use initialization lists while giving a value to constants or references ?? Why is it not possible to do so in the normal way..i.e initializing them …

Member Avatar for ~s.o.s~
0
116
Member Avatar for bops

How would one handle right clicks on a specific control for example, if the user was to right click a static control and I would like to display a menu.. I thought that I could do something like this.. [code=c] LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM …

Member Avatar for bops
0
137
Member Avatar for TheWeakGetEaten

[COLOR=#008000]I am having problems with the following program. We are to create a biary tree that takes words form a text file and then create a link list the the number the word was found on. I have the tree created but I am unsure how to incorporate the link …

Member Avatar for iamthwee
0
170
Member Avatar for tcyge

[code]class abc { public: virtual ~abc() {} static void operator delete(void*); }; int main(int argc, char *argv[]) { abc _a; return 0; } [/code]

Member Avatar for vijayan121
0
77
Member Avatar for tunday

I am relatively new to Borland 2006 C++ Builder. I have a form which has about 6 buttons and a text box for selecting and inputting values respectively (e.g. Clicking on Button 1 should return "100" to a variable in the calling form. Likewise, entering 100 into the text box …

Member Avatar for tunday
0
182
Member Avatar for quintoncoert

i have taken a look around and it seems to me as if visual c++ is an outdated technology. I mean it appears as if no one is using it anymore. Even Deitel, which sells some good textbooks, list them as "old products". Is it worth the effort to learn …

Member Avatar for quintoncoert
0
113
Member Avatar for Matt Tacular

In my program I have a loop with a variable that shows the players name, they choose something then it goes back to display their name and all it shows is arrows.... why? I'll post my code, run it and enter 3 or 4 players are playing, give them some …

Member Avatar for Matt Tacular
0
173
Member Avatar for mankichi

error C2664: 'CWnd::MessageBoxW' : cannot convert parameter 1 from 'const char [1]' to 'LPCTSTR' plz send me: [email removed -Narue] thanks

Member Avatar for mankichi
0
98
Member Avatar for Opo

Okay I had a thread on this already but it was under my friend's account and when I replied to it under my own account nobody knew what was going on and nobody responded after that so thats why I'm making a new one. What I'm trying to do is …

Member Avatar for Opo
0
114
Member Avatar for codeprincess

I am just starting to figure out lotus but I am experienced in C++. Can I compare data from two different databases in lotus notes in C++? What is a good resource? Help!

Member Avatar for iamthwee
0
37
Member Avatar for mark_neil2

Hi, I get equation in the form of a string from the output of a software that I want to modify further. I am no expert in C++ and I am wondering if some expert in C++ at this forum can do this for me. Pls see the attached Notepad …

Member Avatar for iamthwee
0
117
Member Avatar for Matt Tacular

I was wondering how I could access my several countryAttachedXX arrays(in this post they start on line 85), without many if statements, determined by user input. I was thinking maybe an array of arrays, but had difficulty finding out how to do that on the web. Thanks, -Matt [code=cplusplus]/**************************** * …

Member Avatar for Narue
0
86
Member Avatar for Dejai

Hello everyone this is my first post on this forum... Though I am a member of several. Just thought I would share some information with all the people out there who want to know more about c++ game programming. Firstly if you want to make graphical games you need something …

Member Avatar for jbennet
0
94
Member Avatar for bops

hey, how would i go about converting a char* character array to a double. I would like to create a function that takes a char array as a parameter such as "1234.1" and then return that as a double value 1234.1. Is there a function that would allow me to …

Member Avatar for Narue
0
238
Member Avatar for ongxizhe

I have two questions to ask. Firstly, I would lke to know is C++ GUI the same as C++.NET or there isn't such thing as C++.NET? Secondly, although you won't suggest me to learn C++.NET and you would ask me to learn C#, but I'm will still be asking for …

Member Avatar for ongxizhe
0
163
Member Avatar for ongxizhe

How to link Buttons in C++.NET? Example: If I want to link "Button1" which is in "Form1" to "Form2", like if you click "Button1" in "Form1", the program will goto "Form2". What source code should I input?

Member Avatar for ongxizhe
0
249
Member Avatar for lotsofsloths

Ok so here is my code for a practice homework at LiduidEmberS [CODE] #include <iostream> using namespace std; int main(void) { int a; int b; int c; int d; int radius; int volumeprism; volumeprism = b*c*d; int volumesphere = 1.3333333333333*3.1415926536*(radius^3); cout << "Welcome to the program!\n\n"; cout << "Do you …

Member Avatar for ndeniche
0
156
Member Avatar for pntkiran

Hi all, I parse HTTP request(using post method) coming from client.file can be either of binary or base64 encoded.I need to process them differently for each case. (if(binary type) call method1(); else call decode(); // and then call method1())) How will I come to know which kind of encoding method …

Member Avatar for Mushy-pea
0
97
Member Avatar for Matt Tacular

I am trying to make a text version of risk, and I need to store the population, or army count, for each country. So the only way I could think to do that, as you'll see in my code, is by making a variable for each country, and then storing …

Member Avatar for ~s.o.s~
0
88
Member Avatar for Matt Tacular

How do you initialize an STL list with the values when you declare it? That way I don't have to add the values later with a loop and push_back. Thanks, -Matt

Member Avatar for iamthwee
0
261
Member Avatar for ptimoor
Member Avatar for ~s.o.s~
0
89
Member Avatar for nalinibh

Dear All, Many thanks for the answer of my first question though i had the answer for this from one who has already put this question forward.I have modified it and it has worked.Thanks!! Now i want to optimize my coding by adding another condition so that it doesn't perform …

Member Avatar for nalinibh
0
112
Member Avatar for Lutzee

Hi there everyone. I wonder if you could help me with my code. It just seems to go into an infinite loop. I would greatly appreciate some help with this. Thanks [CODE]#include<iostream> using namespace std; int qsrt(int array[], int first, int last) { int over = 0; over = first-last; …

Member Avatar for ndeniche
0
97
Member Avatar for tlee

Hi all, Could anyone help me about returning the array from a function? I believe that it is a syntax error (compile time error) to return an array from a function, but one book mentions briefly that using pointer will solve the issue. However, my current knowledge does not allow …

Member Avatar for Ancient Dragon
3
2K
Member Avatar for dougy83

Hi everyone, I'm a newbie here, and have a newbie question. I'm trying to get a popup menu to show just above my system tray icon/notifyIcon. I'm using TrackPopupMenuEx to display the menu, loaded from my application. The problem is that menu is displayed as a really thin menu, so …

Member Avatar for dougy83
0
140
Member Avatar for sadaka

Hello, I'm a new programmer and wanted to create a simple windows application. I might be getting in a little over my head when writing the code below. All seems well when compiling the code without implementing classes. When I implemented the class AppEngine from a separate source file I …

Member Avatar for sadaka
0
167
Member Avatar for flavour_of_bru

Hi all, Can you please tell me how to read .csv files in C++/VC++?? I converted my excel files to .csv files in order to make reading easy. Need help regarding the code. Thanks Rishi.

Member Avatar for flavour_of_bru
0
136
Member Avatar for bops

Hey, I'm getting a errors from Dev-C++ (Windows XP Professional) about IPN_FIELDCHANGED and NMIPADDRESS.. it appears that they are both not recognised [code] In function `LRESULT WndProc(HWND__*, UINT, WPARAM, LPARAM)': `IPN_FIELDCHANGED' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.) `NMIPADDRESS' …

Member Avatar for Ancient Dragon
0
355
Member Avatar for Matt Tacular

I'm having some trouble with STL lists. What I want to do in my program is take the players initial and put it into an array at the spot that they got from when I divided up 20 numbers (0-19). Can anyone tell me why line 151 (in this post …

Member Avatar for Matt Tacular
0
102
Member Avatar for Matt Tacular

I'm wondering why it prints so many spaces when I only ask it to print one. Here's the code: [code=cplusplus]#include <iostream> #include <string> using namespace std; string ar[21] = " "; int main() { ar[3] = "M"; ar[4] = "n"; for(unsigned int i=0 ; i<20 ; i++) { cout << …

Member Avatar for ~s.o.s~
0
140
Member Avatar for meiyantao

Hi,sir,please look at this code. [code] #include <iostream> using namespace std; class A{ private: class B; public: int out(int x){ return outB(x)->a; } B * outB(int x); private: B* root; class B{ int a; B(int init_a) :a(init_a){} friend class A; }; }; A::B* A::outB(int x){ root = new B(x); return …

Member Avatar for meiyantao
0
181
Member Avatar for shouvik.d

I want to write a parser for C++ which can extract methods and members pertaining to a particular class(es) in a CPP file. I used Parser Generattor tool by BumbleBee softwares and did all the project settings as required by them but still keep on getting fatal errors in Exception …

Member Avatar for iamthwee
0
194
Member Avatar for ongxizhe

Can someone post the specific [B]video tutorials[/B] URLs for - C++ - C# - J# from [URL]http://msdn.com/[/URL] ? Cause I'm having some problems finding them. [B]Or[/B] Anyone knows other site which have video tutorials, or even text tutorials, please kindly post the URL links. Your help will be appreciated. Thanks.

Member Avatar for ongxizhe
0
112
Member Avatar for Matt Tacular

I had a thread going not too long ago, and from that I was able to make a global vector that I can store class objects in. But now when I try to access it, it says "no match for 'operator[]' in 'jailHouse[0]' " Anyways, Here's the code, if you …

Member Avatar for Matt Tacular
0
132

The End.