51,593 Topics

Member Avatar for
Member Avatar for pad510

Hi, When I am trying to return a QString from a method I am getting linker error. My code is like: extern "C"{ _declspec QString _stdcall function1(char* name); } I am using MSVC 6.0 compiler. Could any body help me? (NOte: If I remove _stdcall its working fine) Thanks in …

Member Avatar for Ancient Dragon
0
178
Member Avatar for sudhirblgupta

Hi I am doing programming with c++ and I want to save an exe file from server side to client side through c++.Client and server both are in LAN and server has all access of client machine.can any buddy help me to solve this problem? I want to use c++ …

Member Avatar for Ancient Dragon
0
122
Member Avatar for legendarya49

[code]#include <iostream> #include <time.h> #include <fstream> #define MAXSIZE 400000 #include <cstring> using namespace std; class Students { public: string firstName; string lastName; string social; double gpa; Students() { firstName = "Adam"; lastName = "Wilson"; social = "000-00-0000"; gpa = 0.00; } Students(string newSocial, string newFirst, string newLast, double newGPA) { …

Member Avatar for Ancient Dragon
0
132
Member Avatar for Yaka

hi i wrote this program... it compiles with out any errors.. but when i try to run it in G++ compiller it gives the error "Segmentation Fault (core dump)"... i did a debug on visual c++ and it breaks at line 32 **which is marked below. what the program does …

Member Avatar for ithelp
0
304
Member Avatar for BstrucT

Hi all! I've looked around but to no avail... Is there any builders or apps I can download to create installers for applications written in MS Visual C#? The only option I can find in it is the 'publish' option, but I am looking for some more flexibility. Any help …

Member Avatar for BstrucT
0
88
Member Avatar for rebelvarun

the question is from ----acm.timus.ru "PROBLEM 1095"-VOLUME 1-"Nikifor 3" Nikifor knows that a certain positive integer has in its decimal form each of the digits 1,2,3,4. You are asked to determine if Nikifor can rearrange the digits of the number in such a way that the new number divides by …

0
55
Member Avatar for herms14

hi guys...i just want to get some idea....I read in a book that you could make a tetris game is C++ using pointers...can someone please help me understand how to do it or the concept behind it??? thanks im just curious...^_^

Member Avatar for Dani
0
85
Member Avatar for dark7angelx07

Hi, I need help writing a function that determines if a number is prime. It has to print all the prime numbers between 1 and 10000 this is what i have...where i put a " [U] */* [/U] " is where i need your help..... [code]#include<iostream> using std::cout; using std::endl; …

Member Avatar for DavidB
0
1K
Member Avatar for hyperzero4

Hello! I'm fairly new to computer science, and I'm working on a program that holds a database in a vector. The data type for the vector though is defined as a class. My header file has this in it: [CODE]class problem { private: string name; //Name of person with the …

Member Avatar for bugmenot
0
99
Member Avatar for DaveCachia

Hey all. I'm new to the community and I have found it very useful in the past. I have a problem that I cannot find a solution to: Here is the question As a system administrator, your task is to write a computer program for the CompanyINFR1100 to manage its …

Member Avatar for vmanes
0
119
Member Avatar for sisi

I have to write a programme using loop struture to calculate the following formula r=1/x+1/2x+1/3x+......+1/nx . The user can input any interger for n and nonzero for x .

Member Avatar for Narue
0
125
Member Avatar for Maulth

Hello, thank you for taking a look at this thread. I've been using the C++ language for almost two years now, although my knowledge doesn't amount to much due to the fact that my teacher is a complete moron, hence the reason I'm here, trying to strike out on my …

Member Avatar for vijayan121
0
130
Member Avatar for buvnut

i am trying to create a program that shows details of 40 different hills. he dteails must include hieght and distance from home. i am trying to show tge details in order of height from smallest to highest but i cant get them in order here is all of my …

Member Avatar for Ancient Dragon
0
89
Member Avatar for jimJohnson

I dunno what I did wrong with my program but I am getting a bunch of errors is converting letter to number...could anyone take a look.... [code=c++] #include <iostream> #include <string> using namespace std; string Get_Name_and_Num_Classes(string name, int classes); double Calculate_GPA(char grade, int count); void Get_Letter_Grade(char grade); double Convert_Let_to_Num(); void …

Member Avatar for jimJohnson
0
138
Member Avatar for Waseemn

Hello All I am writing a program, for homework, that would rank 3 runners in 1st, 2nd and 3rd places based on their finish times. I need to bubble sort the names, but it fails. Here is what I have: [code] //Constants Used: const int iLength = 21; //20 Chars …

Member Avatar for vmanes
0
172
Member Avatar for kux

i have a ifstream m_ifsInput variable and I try to open a file like this: m_ifsInput.open( sFileName.c_str() ); where sFileName is a std::wstring variable the error i get when compiling with g++ no matching function for call to ‘std::basic_ifstream<char, std::char_traits<char> >::open(const wchar_t*)’ the thing is the same thing compiles well …

Member Avatar for Narue
0
220
Member Avatar for Crazycfk

i am done with my c++ class and got a passing grade but this project problem that i was suppose to do is incomplete and is stuck in my head so I want to try and finish it but i am stuck here... not sure if i am using a …

Member Avatar for Ancient Dragon
1
123
Member Avatar for chidambaram

hi all, I am working in a Carbon Application(MAC) using C++. I want to connect my application with SQL Database because i want to retrieve the values from the database and use in my application. How to connect SQL.?

Member Avatar for Ancient Dragon
0
36
Member Avatar for hjong.mahjong

code to display linked list: [CODE]for (Node *cur = head; cur != NULL; cur = cur->next) cout << cur->item << endl;[/CODE] in the header file: [CODE] struct Node { int item; Node *next; }; [/CODE] It will declare a new pointer called cur, set it equal to head, and keep …

Member Avatar for hjong.mahjong
0
104
Member Avatar for caio1985

Hello all, This is my first post here, this board seems to contain interesting stuff regarding C++, that's why I subscribed into it. Ok, let's go the problem... I have a class with two methods into it: floodLog writeToLog floodLog is intended to create threads that will execute the method …

Member Avatar for vijayan121
0
3K
Member Avatar for robbins88

I have the binary function done for this question, but I can't get the blur function to work using arrays/matrices. Can anyone help me? This is what I have so far: [code]void threshold(int src[], int rows, int cols, int dest[], int thr) { for (int i = 0; i < …

Member Avatar for dougy83
0
283
Member Avatar for TheFueley

How would I display an IP address from /var/log/wtmp? I know I could use utmpdump, but that's not what I'm going for. I have included bits/utmp.h and can display other members of the struct, but when i try to display the ut_addr_v6 member, I get a random hex address instead. …

0
77
Member Avatar for armen_shlang

hello, Im kinda stuck on how to initialize the class inside the main. Or what to write instead of the ??? inside the main. Thank you in advance... [code] //********************************************************** // Work In Progress // Author Armen Babakanian // A complete set of examples to use reference and pointer issues …

Member Avatar for dougy83
0
93
Member Avatar for amroto

Hi...Plz i'm facing some problems on how to make my program work successfully. i'm a beginner in the c++ and i have an assignement to make a text editor using the devc++..it requires certain functions and i've written this code so far but i can't handle except the choice number …

Member Avatar for amroto
0
484
Member Avatar for L31chH4rdT

Hey guys, first post here so go easy. Ha. I am writing a program that needs to take command line arguments, a number and 2 characters. However, if one of the chars is a command line specific char (such as #, &) it must produce an error. Does the isgood() …

Member Avatar for Salem
0
134
Member Avatar for WIP

These are the question an my codes are attached to this form! Create a class called Reservation. This class will have a data member that is an array of type int, of size 10. This member should be called plane. You should also have a data member called seats which …

Member Avatar for Salem
-1
617
Member Avatar for robotnixon

I'm having a tough time conceptualizing this problem. I have a recursive function computing the number of possible combinations of two numbers. I have it working fine, just need one thing sorted out. My output needs a counter to increment each recursive step. Like this: Level 1: ... Level 2 …

Member Avatar for robotnixon
0
93
Member Avatar for mzdiva041986

I have some errors that I can't seem to understand, could someone help me clear up this problem? [CODE=cpp]#include <cmath> #include <iostream> using namespace std; double F ( double X ) { return pow ( X, 4) - 9*pow ( X, 3 ) - 2*pow (X, 2) + 120*X - …

Member Avatar for WaltP
0
143
Member Avatar for bhoot_jb

i want to clear a doubt... please check out the following codes.. [CODE]int function (int p[]) { //sm code } [/CODE] another style is : [CODE] int function (int *p) { // sm code }[/CODE] here i am passing an array to both the functions...and one receives it through p[] …

Member Avatar for bhoot_jb
0
119
Member Avatar for tgiboss1

Hello, I searched most of yesterday online for an answer to this question and was unsuccessful. please help. What I am trying to do, I have an emulator.exe application which is totally external from any project of my own. I want to create a control (custom control, activex control???) on …

Member Avatar for tgiboss1
0
805
Member Avatar for Nemoticchigga

Hey, Any Idea why this section of code would give me these linker errors using Visual Studio 05 in a console application and using winsock2.h: error LNK2019: unresolved external symbol __imp__WSACleanup@0 referenced in function "void __cdecl CloseDevice(void)" (?CloseDevice@@YAXXZ) error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "void __cdecl CloseDevice(void)" …

Member Avatar for Nemoticchigga
0
92
Member Avatar for sudhirblgupta

i am getting error like " [Linker error] undefined reference to `WNetOpenEnumA@20' " How i can solve it?

Member Avatar for Ancient Dragon
0
59
Member Avatar for Traicey

I am having a problem in knowing where to start with my project that has to ask a user to enter a string of characters.. you can limit the size of characters and u decript those characters u can print them backward or u can change them into numbers depends …

Member Avatar for Traicey
0
104
Member Avatar for LindaWiklund

If I want to make a method to return an object's type, what type should the method return? A string, the object itself? Any suggestions?

Member Avatar for LindaWiklund
0
6K
Member Avatar for 666kennedy

im starting a sub proceedure to test program once its worked through earlier processes. however to test the program, i have copied and pasted pieces of the program before hand, and because ive used the same variables they need to be declared again. but since things are stored in these …

Member Avatar for 666kennedy
0
257
Member Avatar for sudhirblgupta

Hi I want to make a pure c++ application which is used to retrieve ip address of all connected users of LAN(local area network). I am using Dev c++ IDE. please any buddy have any idea to solve this problem? Thanks in advance!

Member Avatar for sudhirblgupta
0
572
Member Avatar for cheesy_mel

Hi, i'm new in C++ i was asking to get an input from user, eg. 12 -8 7/8 6 D. Valid input is type of whole number and fraction, and D marking end of input. i'm doing the input validation. if there is an error input, eg. 4 92 1/2 …

Member Avatar for vijayan121
0
111
Member Avatar for jimJohnson

I apologize if this does not sound clear. I will show the assignment and what the output is supposed to look like along with the code that I have so far.....My problem is pretty much typing this xxx to exit....I have always used numbers for this so a string would …

Member Avatar for vmanes
0
251
Member Avatar for mikky05v

I'm a student enrolled in a University beginners programming course. The problem is: [B]Write a program capable of using month and day of a given date to calculate the number of days from january 1 that it represents. Make the program capable of computing values for as many as 20 …

Member Avatar for mikky05v
0
127
Member Avatar for noraantonia

Hello:) I have a problem that keeps repeating. I work in Visual C++ 6, and i deleted a class, i erased it from program files/microsoft visual studio/my projects/bla bla.. and i deleted the code in it(the header and cpp file), and it dissapeared from the class tree in my workspace, …

Member Avatar for noraantonia
0
128
Member Avatar for Jennifer84

I wonder how it is possible to open 2 instances at the same time of a Form. Normally when you ex press a button to open another form, one instance of that form is opened. If I put these 2 lines inside a buttoncontrol, first one instance is opened and …

Member Avatar for Jennifer84
0
148
Member Avatar for Majestics

I HAVE AN ASSIGNEMENT IN WHICH I GET STUDENT DATA AND SAVE IT A SEPARATE TEXT FILE , THE MAIN PROBLEM IS THAT IT TAKE ALL THE VALUES BUT DONOT STORE VALUE OF SEM,ADD-NO AND BATCH . KINDLY PLEASE HELP ME . Coding is :- [code=cpp]#include<iostream.h> #include<conio.h> #include<fstream.h> struct stud …

Member Avatar for Lerner
0
58
Member Avatar for DOrmisher

I was wondering if anyone could help me with this little problem. What I am actually trying to do is implement 'picking' into a game I'm doing, but I'm actually stuck with some of the maths, thats why this isn't in the game forum. I'm trying to work out a …

Member Avatar for DOrmisher
0
415
Member Avatar for noraantonia

hello. i have a question. i am quite new to visual c++ programming, and i was wondering how can i use glut in a mfc appwizard profect, and not only in a win32 application. for example i need to draw a sphere and i would like to use the single …

Member Avatar for vijayan121
0
105
Member Avatar for daviddoria

I am getting a whole bunch of these: warning C4996: 'vsprintf' was declared deprecated see declaration of 'vsprintf' Message: 'This function or variable may be unsafe. Consider using vsprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. I put this at the top of my code: #define _CRT_SECURE_NO_DEPRECATE but nothing changed, I …

Member Avatar for vmanes
0
107
Member Avatar for Ben10

Take (10) integers, store them in 1D array then do the following: 1. find the max and min number of them 2. find the average 3. sort these numbers in ascending squence the first two questions are quite easy but my problem is in sorting those numbers...anyways, i came up …

Member Avatar for Ben10
0
127
Member Avatar for jimJohnson

For some reason when I compile my code the hypotenuse returns to just 0 and it returns an integer and not a double and was wanting to know if anyone had any suggestions........ [code=c++] #include <iostream> #include <cmath> using namespace std; double Calculate_Hypotenuse(int length_one, int length_two); int main() { int …

Member Avatar for gkbush
0
279
Member Avatar for Traicey

I have been trying to figure something out ever since I started doing C++, My goal is to code my own game and coming to think of that.... I have read many articles about how U go about on doing that and as far as I have read C++ is …

Member Avatar for Traicey
0
157
Member Avatar for k2k

can anyone please point out what is wrong with my seeForward function? My program run fine with the option 2 ... however,, seeforward isn't working .... thx [code=cpp] # include "Name.h" struct Node { Name name; Node *link; }; typedef Node* NodePtr; void head_insert(NodePtr& head, Name* inName); void output(NodePtr head); …

0
61
Member Avatar for thedonshi

Hello everyone, I am making a program which acts like a library system. There are two classes: Book and List. The List class contains all the linked list information; [CODE] struct ListNode { ListItemType item; ListNode *Next; };[/CODE] Now, my problem is in the Book class file (Book.cc). I have …

Member Avatar for Narue
0
132

The End.