51,593 Topics

Member Avatar for
Member Avatar for functionalCode

I have been searching and can't quite find how to call a C++ library function from masm. I would like to be able to call printf and system. Can anyone point me in the right direction? Thanks

Member Avatar for ov3rcl0ck
0
97
Member Avatar for EddieC

With its release on Monday of the [url=http://www.microsoft.com/hpc/en/us/default.aspx]first public beta of Windows HPC Server 2008 RC2[/url], Microsoft also was touting features introduced in the [url=http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx]second beta of Visual Studio 2010[/url]. Expected in March, Redmond's next IDE will simplify development of new applications and modification of existing ones to take advantage …

1
212
Member Avatar for StaticX

<thread split from [URL="http://www.daniweb.com/forums/thread172315.html"]here[/URL]> Could i have an elaboration on this explanation please? My poblem being that i have wrote 2 objects to a binary file called "data.dat" No problem there. But then i have a function that needs to find the number of objects in the file.I can do …

Member Avatar for Ancient Dragon
0
90
Member Avatar for Phil++

Hey, I'm trying to put all the objects of my class into an array so it will be easier to display.. It doesn't work though! Here is the code: [CODE] #include <cstdlib> #include <iostream> #include "manager.h" #include <windows.h> using namespace std; void displayManagers(); int main(int argc, char *argv[]) { displayManagers(); …

Member Avatar for Grn Xtrm
0
199
Member Avatar for mrinallabs

Hello There, I want to know how to connect a c++ program with a database. Please provide a beginner approach tutorial...

Member Avatar for Ancient Dragon
0
26
Member Avatar for wesleychin

Hi guys, if anyone can help me with the basic C# programming concepts, please send me an email at <email snipped> and I can email you my project for you to see what the problem is with it. It is almost complete but it keeps throwing an exception and I …

Member Avatar for Geekitygeek
0
138
Member Avatar for alexa868

Hey guys... I want to write a program that transforms numbers into letters and letters into numbers... for example 20 would be transformed into twenty I have this but I don't know what's missing or what's the problem... help please [CODE]#include <iostream> #include <string> using namespace std; using std::string; void …

Member Avatar for rati
0
147
Member Avatar for tkud

hey, everyone. I am still learning templtes and I have 2 questions: 1-Why is it that all the examples of templates I have seen are about arrays?Is that all templates are used for? 2-after pondering about the above question, I decided to try something else witha template..a generic unction. However …

Member Avatar for tkud
0
100
Member Avatar for kent01981

How to store string words into individual variable For example: string str1(“Today is a very nice day!”); [B] then we need to store[/B] string s1 (“Today”); string s2(“is”); string s3(“very”); string s4(“nice”); string s5(“day”) Thanks a lot!

Member Avatar for jbennet
0
3K
Member Avatar for AdRock

I've got to write a code parser but am really stuck I have to read a file, process each token and output to a new file. Reading and writing to files isn't a problem, it's processing each token. What i've done is read the file and add each token to …

Member Avatar for dkalita
0
92
Member Avatar for silkyheart

umm... i have this school project... and i wanna make a game using c++... but i dont know how to do it... so please... any suggestions?

Member Avatar for Nick Evan
0
73
Member Avatar for farhan0795

Problem Statement: Merging and Sorting of character arrays You are required to write a program that takes character values in two different arrays as input from user. After getting input, make a third array and merge both these array in third array. Output array must be sorted in ascending order. …

Member Avatar for mrnutty
0
126
Member Avatar for MooAndStuff

Hey guys, first of all thanks for the time to even read this. Basically, Ive had some trouble in figuring out how to get this operator overloading to work. I think I'm having trouble in the functions calls that are within this function. These functions that are giving me trouble …

Member Avatar for MooAndStuff
0
108
Member Avatar for kitty7

Okay, well, I got my Address Book project done on time :) My current project is to turn it into a class. I have been working on this for a while and I keep getting set back to square one. My biggest problem is with writing some sort of user …

Member Avatar for jyoti bansal
0
227
Member Avatar for sebassn

Hey guys, I'm just doing this code to see if it works where the user inputs a name and it outputs a menu where different options can be chosen. For example, if the user press 1 the outputs of the name is reversed, if 2 is pressed the name is …

Member Avatar for sebassn
0
88
Member Avatar for dominion

I'm using Visual Studio 2008 express and I'm simply trying to put my source in different files. I have my Definitions in my .h file, my definitions in my cpp file, and my main.cpp file. I thought this was the correct way of doing things but the linker still has …

Member Avatar for Ancient Dragon
0
105
Member Avatar for kenny1989

Hi all, For my project I'm doing a comparison between solving ODE's in MATLAB and using the GPU to solve them. Anyone know of an accurate way of timing how long the program takes to run on the gpu (same kind of accuracy provided by matlabs tic toc command)? I …

Member Avatar for VernonDozier
1
189
Member Avatar for C++ Beginner

Heres the homework problem: Write a program that displays the status of an order. The program should have a function that asks for the following data: 1. The number of spools ordered 2. The number of spools in stock 3. If there are special shipping and handling charges (Shipping and …

Member Avatar for sfuo
0
3K
Member Avatar for scott6480

I get the following error when I try to compile this code. Can anyone help me make sense of this error? I have tried defining keystroke as a string and a char, I get the error either way. 1>------ Build started: Project: Register, Configuration: Debug Win32 ------ 1>Compiling... 1>Register.cpp 1>i:\c++\register\register\register.cpp(121) …

Member Avatar for kvprajapati
0
573
Member Avatar for squigworm

Hello, As far as I know, the fastest way to initialize an array is to do so using a for loop... Does anyone know if there is an equally fast or faster method of initializing a c++ array ? Any insight on this topic is greatly appreciated. Thanks, Colin

Member Avatar for mrnutty
0
243
Member Avatar for noey699

I am learning how to program through the windows.h library and was following a tutorial. After I copied the code to just create a window I got a lot of errors here is the code [code=c] #include <windows.h> #define WNDCLASSNAME "wndclass" //the needed global variables using namespace std; HWND handleWin; …

Member Avatar for sfuo
0
255
Member Avatar for scott6480

I have to write a program for class that will read a datafile into a structure. The data file is a menu of food items at a fast food restaurant. Basically simulate a cash register I created a structure menu[26] which includes the following elements key - a,b,c,d etc. item …

Member Avatar for jonsca
0
87
Member Avatar for hpfreak08

I have to make a recursive function that is passed a location in a previously allocated 2D array, and changes the "color" (indicated by a letter) from the "oldColor" to the "newColor." The function then changes any adjacent elements containing the "oldColor" to the "newColor." (If you are confused by …

Member Avatar for hpfreak08
0
147
Member Avatar for dondulla

hi, unfortunately i need a bit of help with a config for a program that an ex-employee of ours wrote. Basically, the program verifies itself on a website and verifys one specific type of bluetooth hardware is connected. we have recently changed hardware suppliers and need to take the requirement …

Member Avatar for NicAx64
0
117
Member Avatar for brad82

Hi all, Im new here - so please bear with me ;) Im pretty new to C++, although I have previous experience in C. I created a small socket app that allowed a client to connect via telnet and send some data for it to be assessed. I have recently …

Member Avatar for brad82
0
89
Member Avatar for hussamo

[code=c++] #include <iostream> #include <string> #include <cmath> #include <cstring> #include <cctype> using namespace std; class link { struct employee { int x; employee *next; } void insert() { employee *temp; temp=new employee; employee *first; first=new employee; if(first=NULL) { employee *tmep; temp=new employee; temp=first; cin>>first->x; first->next=NULL; } else { temp=first; first=temp; …

Member Avatar for mrnutty
1
72
Member Avatar for squigworm

Hey everyone, I am looking for some guidance in regards to the track of my programming related education. I am about to finish my first intro to programming c++ class and love it. I want to continue studying programming but feel a little lost as to what is the best …

Member Avatar for squigworm
0
106
Member Avatar for javaconfused

The Demetris Leadership Center publishes the books, DVDs, and CDs listed in the following table: Title: Description Product Number Unit Unit Sold Brave New World Book 110 25.50 925 Lady Gaga CD 111 16.00 275 The Forgotten DVD 112 24.50 289 Twilight DVD 113 45.50 135 The Giving Tree Book …

Member Avatar for tkud
0
125
Member Avatar for hussamo

[CODE][/CODE]// i need a linked list that can do those functions //-------->>> insert , delete ,search ,check if empty ,print <<<----------- // plzzzzzzzzzz i can't inderstanund //i did understand the insert functoin but the other not :'( [CODE]#include <iostream> using namespace std; class link { public: struct employee { int …

0
60
Member Avatar for dotnabox

So for my latest assignment, I have been asked to convert our LinkedList and ListNode classes to template classes. I understand the general idea of templates, but all of the examples deal with more concrete examples. I'm having trouble extending it to my multi-file project with intermingled data types and …

Member Avatar for dotnabox
0
136
Member Avatar for infern0

I have to write a program that calculates the avg, min, and max. The program runs fine, but when a user decides he doesn't want to enter any scores (enter: -1) in the beginning it still tries to calculate the avg,min and max. I need the program to end w/o …

Member Avatar for pecet
0
118
Member Avatar for EngneerNitemare

I built this entire program and it does what I want it to except I want to use a bubble sort algorithm instead of the [CODE]std::sort()[/CODE] function I have right now. So please help me out on this. I don't really understand how bubble sorts work even after reading up …

Member Avatar for mrnutty
0
2K
Member Avatar for maverick405

Hi, I am trying by best to code this program which takes user input of ten different numbers and displays it's square and cube, from the below code I can display the square of input numbers but in cube i am having problem please help me solving this. [code] #include …

Member Avatar for mrnutty
0
141
Member Avatar for tolby99

Hi, Can anyone fix this code that i have made here. the objective to the program is -to make an array for an unknown number of integers. -Quit value is -1. -Keep track of how many numbers in array -If array is full output full message (full is 25 numbers …

Member Avatar for donaldw
0
131
Member Avatar for C3PO

When i use dlopen to dynamically load a library it seems i can not catch exceptions thrown by that library. As i understand it it's because dlopen is a C function. Is there another way to dynamically load a library that makes it possible to catch exceptions thrown by the …

0
67
Member Avatar for kent01981

Hi people, Can anyone helps me out. I need use C++ to do this: [U]"Use polymorphism to build an object which can be stored in a datastructure such as an stl::map but uses polymorphism to perform different actions depending upon the type. You may find an stl::map is also useful …

Member Avatar for Nick Evan
0
181
Member Avatar for nida

i have made a programe of queue in c++ code is : [code] #include<iostream.h> #include<conio.h> #include<stdio.h> #include<stdlib.h> #include<process.h> #define maxsize 5 struct que { int items[maxsize]; int rear , front; }; void insert(struct que *,int); int remove(struct que *) ; int empty (struct que *); void makenull(struct que *); void …

Member Avatar for Me_Nit
0
231
Member Avatar for chet6

Hi, Could anyone please explain how the memory allocatio is done in case of double pointers?

Member Avatar for manutm
1
137
Member Avatar for bpt0004

I'm trying to run my program but i can't find out why its giving me a segmentation fault. Please Help. [CODE]#include <cmath> #include <cstdlib> #include <ctime> #include <string.h> #include <fstream> #include <sstream> #include <stdexcept> #include <stdio.h> #include <ctype.h> #include <vector> #include <cctype> #include <algorithm> #include <iterator> #include <iomanip> #include <cstdlib> …

Member Avatar for donaldw
0
138
Member Avatar for skalber

Hey, I got a problem with my multi-threaded application. I have one thread that waits for an event to be signaled, when it happens it calls PostMessage and passes a handle of the main window created by the GUI thread with a custom message I handle in my window message …

Member Avatar for skalber
0
94
Member Avatar for GagandeepKaur

Hi, im trying to calculATE DFT through this code, i dnt know what's wrong please enlighten. Thanks [CODE]#include<conio.h> #include <math.h> #include <complex.h> main() { int m,n,r,N,j; float l,o; float complex x[1000]; float real, imag; { for (m=1;m<=10;m++) { for (n=1;n<=10;n++) { for (j=1; j<=10;j++) N=1000; r=1/N; l=sin(3*j); printf("the value of …

Member Avatar for GagandeepKaur
0
205
Member Avatar for AdRock

I have some code i've written and i need to splita string and assign the results to 2 variables type and value The first part of the string up to the : would the type and what is after the : would be the value When i output the variables …

Member Avatar for Ancient Dragon
0
94
Member Avatar for varun_p_n

I have a com component that logs error details. I wan't to delete the log files that were created one month back. Where this code has to be written ? I mean it should be run only once when the COM compponent is loaded for the first time.

Member Avatar for Ancient Dragon
0
397
Member Avatar for racumin

Hi, in java, I can use packages to combine classes which have similar traits. For example, I have a package "worker" and classes in this package contains "Programmer.java" and "Designer.java" I want to know how to do this in C++. What I did was this: 1. created a source folder …

Member Avatar for Ancient Dragon
0
96
Member Avatar for gauravkr

Hi Guys!!! I'm Gaurav Kumar presently in sydney for my higher studies. I come from the Patna city of India...Hope to see a good discussion on c++ as i'm fairly new to this programming language....... I wish you all a very healthy discussion and happy knowledge sharing... best regards Gaurav

Member Avatar for surindersharma
0
60
Member Avatar for kjiu

Hello, I have to change this code (c++) on Java, can you help me. [CODE] QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName) { QFile file(fileName); if (!file.open(QFile::ReadOnly)) return new QStringListModel(completer); #ifndef QT_NO_CURSOR QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); #endif QStringList words; while (!file.atEnd()) { QByteArray line = file.readLine(); if (!line.isEmpty()) words << line.trimmed(); } #ifndef QT_NO_CURSOR QApplication::restoreOverrideCursor(); #endif …

Member Avatar for masijade
0
84
Member Avatar for Joebrauk

Hey, I'm new here. Just getting into c++ programming and saw some great resources on this site. I figured out how to print a fully random array, but I need help printing an array like this. 1 2 3 2 3 1 3 1 2 It could be any three …

Member Avatar for mrnutty
0
76
Member Avatar for StaticX

I am trying to make a small program which will write to a binary file,this is my code: [CODE]// program that writes to a binary file #include <iostream> #include <fstream> using namespace std; main() { fstream* bfile = new fstream("file.bin", fstream::out | fstream::binary | fstream::ate); int a = 2; int …

Member Avatar for Nickg140143
1
271
Member Avatar for koool.vaibhav

pthread_mutex_lock() call never returns causing other threads to wait for gaining its lock forever in turn causing 100% cpu load. I have tried using alternate call pthread_mutex_trylock() which try to lock and if the mutex is locked in some other thread it returns with an error code. The above mentioned …

0
37
Member Avatar for maverick405

I am trying to find the average for the 10 different integer input from user and then to fine numbers above the average and below the average, I dont know what is wrong the code below executes and i am able to input 10 different integer but after that the …

Member Avatar for maverick405
0
100

The End.