49,761 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
186
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
425
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
209
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
242
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
188
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
264
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
794
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
237
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
156
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
124
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
221
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
126
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
187
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
140
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
177
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
194
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
128
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
710
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
105
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
147
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
231
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
115
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
610
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 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
193
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
114
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
167

The End.