51,593 Topics

Member Avatar for
Member Avatar for thierrypin

I have this problem: I have a data structure called DACT, that I convert into a string line and send to another computer. I have a file full of DACTs, and I need to send them all to another computer. When I send only 100, it works fine, but when …

Member Avatar for thierrypin
0
190
Member Avatar for Muhammad Anas

I just downloaded a document containing some pointers exercises. The statement of One of its questions is as follows: [COLOR="Green"]Write a function that returns a pointer to the maximum value of an array of double's. If the array is empty, return NULL. double* maximum(const double* a, int size); [/COLOR] It …

Member Avatar for Muhammad Anas
0
1K
Member Avatar for Suzie999

How can I get a new line in messagebox? I have two TCHAR arrays, I can print both to separate MB but not both to one This is what I'm looking for (if you can understand what I'm trying) It obviously does not work. [CODE]TCHAR one[] = _T("file\\path\\here"); TCHAR two[] …

Member Avatar for Suzie999
0
433
Member Avatar for pok.kys90

my professor gave a .o file and we are supposed to write a function that links to his file in ssh. his code is struct grades { int lab; int prog; int mid; int final; char name[10]; } void fillArray(grades a[ ], int & num); these two are given and …

Member Avatar for VernonDozier
0
212
Member Avatar for pok.kys90

I am new to c++ and i am supposed to do a test case using my stub with hand calculated mean & standard deviation of number of students that are saved in the .o file in linux. my code is [code] #include <iostream> #include <fstream> #include <cmath> using namespace std; …

Member Avatar for pok.kys90
0
244
Member Avatar for wyzbs

Hi guys, I have a windows form frm1 that calls another form frm2 by the following code: [CODE] this.hide(); frm2 new_frm2 = new frm2(); new_frm2.ShowDialog(); this.Close(); [/CODE] it takes about 5 sec for the frm2 to show so I'd like to use waitcursor. I found that the waitcursor can only …

Member Avatar for skatamatic
0
227
Member Avatar for moshe12007

Hello!!! I read 3 c++ books on dos and what now? I think i want now to programming on windows but which language i can programming ?

Member Avatar for mrnutty
0
192
Member Avatar for JimSim

Hi all I think that I should start this by saying that I am fairly new to C++. Currently, I can only write basic OOP programs. However, I have been given a task at work to compile and link some old code that we have (roughly 10 years old) to …

Member Avatar for JimSim
0
281
Member Avatar for forumposters

I need to write a main() function, that loops over a bunch of numbers from 0 to 100, calls another function called isPrime() for each of them, and print out the numbers that are prime. I'm new to C++ and any help would be appreciated.

Member Avatar for yashsaxena
0
796
Member Avatar for Pascode

Hi, I've been trying for the past couple of hours to get this modal dialog box working, it is basically supposed to ask for text input and once entered will open a message box with that text. At this point though I'd be happy to just get the box up …

Member Avatar for cool_zephyr
0
247
Member Avatar for leetari

Hi there, I am working with a 2D array, my c++ program reads input from an external file and stores it into a 2D array. Say, for example, this is my input file: 9 5 6 2 4 1 0 8 6 7 3 5 2 9 5 8 My …

Member Avatar for leetari
0
4K
Member Avatar for Muhammad Anas

Hello guys, I am trying to declare a two dimensional array in C++ on runtime. For this purpose I am asking the user about how many rows and columns should be created in the array. I have written the following code for this purpose. Apparently it is working just fine. …

Member Avatar for Muhammad Anas
0
159
Member Avatar for Labdabeta

I need to make a function: [CODE]void GenerateNormal(float x[3], float y[3], float z[3], float &ox, float &oy, float &oz) { //Calculate coordinates for a glNormal and return them ox,oy and oz }[/CODE] I have a sinking feeling that the math will be quite difficult. Can anybody help me?

Member Avatar for Labdabeta
0
126
Member Avatar for zeronis

Hi! Using string, ifstream and ofstream object. Compiling - ok, but give a run-time error after printing Name in ReadData() function. My Person class include only one string member "name" and function "Name()" which return string object "this->name". And constructor with string parameter of course... [CODE]#include <iostream> #include <fstream> #include …

Member Avatar for Narue
0
222
Member Avatar for dmizz002

Hi all, I am quite a beginner to C# and ASP.NET development so if you can help out it would be really appreciated: I wish to build a small library of custom functions to be used throughout the entire website. For example say I need to build 5 functions which …

Member Avatar for aspproject
0
177
Member Avatar for theguitarist

[CODE] cout<<(char)290<<endl; [/CODE] I get " as the answer. [CODE] cout<<(char)20000<<endl; [/CODE] Here I don't get anything. When char can take integer values from -128 to 127 and both 290 and 20000 are welll out of this range, then why is there an output in the first case?

Member Avatar for pseudorandom21
0
130
Member Avatar for lochnessmonster

i dont see the point or why you would ever want to upcast an object for example class Shape { ..... }; class rectangle : public shape { .... }; int main() { rectangle object1; Shape *shapePtr = &object1; return 0; }

Member Avatar for thekashyap
0
189
Member Avatar for ztdep

Dear friends: I am working on a C++ computational geometry code, and i want to make sure whether two points are the same by comparing their x y and z coordinates. The coordinates of the points are in the double formate. since the pc can not represents the double number …

Member Avatar for ztdep
0
1K
Member Avatar for ichigo_cool

I'm just wondering what kind of free SQL API I should use to connect with c++ so I can use a database with my programming to make it a lot nicer and more neat for my objects... I've done a bit of search and fount things like ADO or ODBC... …

Member Avatar for Ancient Dragon
0
143
Member Avatar for thecoolman5

hey, I was recently programming my own variable equation solver in C++ and out of nowhere, my computer crashed and all my code was erased. My computer booted up just fine but none of my code was there. i dont have the guts to start all over again. I dont …

Member Avatar for thecoolman5
0
182
Member Avatar for Psyho

Hi I am in a bit of trouble. what is nedded: Reading a text file character-by-character, using the "get(char)" function. Count the words in the file which contains "w" or "W". The possible delimiters are: '\t','n',' '(space). Do not use arrays. The codes: [COLOR="Red"]MAIN.CPP[/COLOR] [code] #include <iostream> #include "enor.h" using …

Member Avatar for Labdabeta
0
196
Member Avatar for warrior4321

Hello, I am very new to C++. I am learning the language by myself. I tried to make a program where the user inputs how old they are (in terms of years) and the program will output how old the user is, in terms of months. The problem I am …

Member Avatar for warrior4321
0
131
Member Avatar for shyla

I need to verify with some one if my code is right i have to submit it in 3 hours from now and any help will be welcome The instructions are: Using an appropriate definition of listnode, design a simple linked list class with only two member function and a …

Member Avatar for fatima mustaf
0
713
Member Avatar for Mr. K

I created my own Pong, but the ball is not moving. I don`t have any error in my error list. In this game I used time.h to move the ball. Why the ball is not moving? What is wrong with my code? Thanks in adbvance [CODE]#include <allegro.h> #include <time.h> int …

Member Avatar for raptr_dflo
0
107
Member Avatar for maxicube

Hey there, was wondering if anyone else has this issue. I've checked to see if it was my drivers, but no. the GL window wont move, it won't accept any inputs at all. but it shows everything else. I've tried everything in my memory bank.. and still nothing. this is …

Member Avatar for maxicube
0
148
Member Avatar for QuesoTaco

I am studying viruses and trying to figure out how the FLEX module works for C++. I have taken classes before on regular languages, context free, etc. Is FLEX dealing with regular languages or regular expressions, and also what is the difference exactly? Could you give an example of how …

Member Avatar for gusano79
0
233
Member Avatar for zenv0id

Hello, I'm a C++ newbie with the following problem (I've used the search function but haven't come up with what I'm looking for. I'm not asking anyone to write this project for me, but a lot of good pointing/ideas is going to help me a lot): I currently have a …

Member Avatar for WaltP
0
118
Member Avatar for gianks

Hi All, i'm here due to an unexplainable winsock problem. I've wrote a simple TcpSocket class to wrap in an object oriented way, the winsock functions. For testing purposes i've written two applications too, a client and a server, wich just send/receive 10 bytes in a giant loop. Now the …

Member Avatar for gianks
0
623
Member Avatar for ilovec++

Can someone please tell me about an alternative command that I can use instead of the [B]system()[/B] function? I have another question - If [B]system("pause")[/B] only pauses the program before it exits, can I use [B]getch()[/B] funtion from the [I]conio.h[/I] header file for that purpose.(I know i can use the …

Member Avatar for katmai539
0
2K
Member Avatar for Nurder

Hi everyone ... I've a problem with fill color. I just want to fill a part of it. For ex.: if we have a face with eyes and red mouth, i wanna to color each part of the face when the user click down the mouse. Thanks for your advice....

Member Avatar for Nurder
0
361
Member Avatar for ichigo_cool

Hey all, I want to add a vector to my inventory class so that it can hold whichever item data type is passed in. I'm having trouble with setting the size of the vector so that I can put items in it. Here's my code.. Whenever I run it I …

Member Avatar for ichigo_cool
0
197
Member Avatar for frogboy77

I wrote this test code trying to work out a problem. The code gives the correct answer for the example (zero) but to understand the problem i need to understand what the code is doing on a sort of step by step basis. In other words how to do it …

Member Avatar for frogboy77
0
116
Member Avatar for shilosimi

Hi. I'm trying to delete a line from a Db file that I've created. I'll explain: I'm making a Db of people, which is consisted of id, first and last names - each one in a different line. When I want to delete a record, I wanted to copy the …

Member Avatar for tkud
0
170
Member Avatar for gregarion

Hey guys , i have a small problem regarding calculation in c++. Here is an example below [CODE]int main() { int f = -32; int d = 2; int re = d - f; int re2 = 2 - (-32); int re3 = 2 - - 32 } [/CODE] The …

Member Avatar for tkud
0
121
Member Avatar for raj03

I am unable to solve the errors found in this program. Can someone be kind to help me solve it? Thanking in advance. :) [CODE]#include "stdafx.h" #include <iostream> using namespace::std; class detail { protected: char address[50]; int age; char name[25]; public: int a; int b; int c; void getdetail(void) { …

Member Avatar for tkud
0
192
Member Avatar for judithSampathwa

hi i am creating a login page in C#.net windows application and i have a remember me checkbox in the login interface. can some one give me a tutorial to code the remember me check box in the C# windows application thank you

Member Avatar for C#Jaap
0
2K
Member Avatar for montjoile

Hi. As far as I know, [B]typedef[/B] is used to assign an alias for a structure or type of data, am I wrong? Is there something more to know about Typedef? thanks

Member Avatar for montjoile
0
147
Member Avatar for ben1996123

Hellochina, I rarely use C++ but yesterday I came up with an idea for a program. What I want to happen is for the program to take a string, and for every letter, replace it with something else (for example, the letter after, or the number of the letter in …

Member Avatar for predator78
0
263
Member Avatar for shrutinr

Hi , I m doing my project in vc++.. I need to interact my vc++ project with NI MAX software.. I m taking Frame API for ineracting to UPS . I included "nican.h" header file for that. I didnt missed any brackets... but while executing i m getting error like …

Member Avatar for Smalls518
0
958
Member Avatar for eng51

I use Borland C++ Builder ver 5 - and always want to make stand alone exes. I now wish to create and use my own libraries. I made a simple .cpp, ran "bcc32 -c mycode.cpp" to create mycode.obj, then ran "tlib mylib +mycode" to create mylib.lib. I created a .h …

Member Avatar for eng51
0
111
Member Avatar for smrati.katiyar

[CODE] #include <iostream> using namespace std; int main() { cout << "enter" << endl; int a,b; cin >> a >> b; cout << a << " " << b << endl; return 0; } [/CODE] in the code given above when the input is INPUT: 45 12 OUTPUT: 45 12 …

Member Avatar for Ancient Dragon
0
129
Member Avatar for SLaSH1Z

can i find out how much memory(pysical) a specific process(application) will consume befor launching it? i wrote aan app that manage the memory usage and say i have 10% memory left to use i want to predict approximantly how much mem is needed for an app befor launching it... and …

0
66
Member Avatar for I Like Pills

Hey everyone. I was just wondering if anyone who programs for a living or just as a hobby ever gets bored of it? And if not, why do you not? And if you do, what keeps you wanting to continue doing it? Thank you.

Member Avatar for pseudorandom21
0
370
Member Avatar for surferxo3

[code] //Mohammad Sharaf Ali k092094 #include <iostream> #include <iomanip> #include <string.h> #include <math.h> using namespace std; struct tree { char a[20]; int s; struct tree *left,*right; }*root=NULL,*tt[20]={NULL},*temp,*temp2,*t2,*ri,*le; struct pqu { int info; char a[20]; struct pqu *ptr; }*front=NULL,*t,*par,*t1,*p1,*p2; struct pqu* fp(int info) { struct pqu *p=NULL; for(t1=front;t1->info<info&&t1!=NULL;t1=t1->ptr) { p=t1; } …

Member Avatar for thekashyap
-1
130
Member Avatar for deluxnate

Small introduction; been using C++ for two years at college level, and now I've outgrown the console. Having a little trouble in wxWidgets though, since I apparently don't understand how wxButtons work. What I want to do is have a dialog come up with text entry, and an ok button …

0
54
Member Avatar for networkZombie

OK so I have to compare Java with C++ and I need to address the following topics - The following topics should be compared: - programming constructs that are in one language and not the other, differences in - programming in one language or the other should be addressed the …

Member Avatar for meo_beo
0
114
Member Avatar for littlestone
Member Avatar for Saith

I somewhat understand the concept of the parentheses overload when you need to use an object as a function. The question that I have is why does the max variable in the listed code below always input 2. [CODE] /* Purpose: This is the header file of randomInteger.h The class …

Member Avatar for Saith
0
337
Member Avatar for lochnessmonster

[url]http://www.ibm.com/d...rary/pa-dalign/[/url] Can anyone plz explain why , according to this article, an x86 processor can't read simply 4bytes from an odd address and has to make 2 reads then shift bytes to get aligned to the correct value? I dot see why a processor can't read from an odd address …

Member Avatar for mike_2000_17
0
129
Member Avatar for QuesoTaco

I am trying to get consecutive words in a document using flex. Normally the forward slash should work, but for some reason it is not. Also I need to account for spaces. So I can't seem to use that regex character for this, how do I account for consecutive words …

0
135

The End.