49,761 Topics
| |
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 … | |
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 … | |
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[] … | |
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 … | |
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; … | |
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 ? | |
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 … | |
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. | |
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 … | |
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 … | |
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. … | |
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? | |
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 … | |
[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? | |
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; } | |
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 … | |
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... … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.