51,593 Topics

Member Avatar for
Member Avatar for DeadJustice

This is a method I used for adding a object, flightnode, into a linked list. Basically it takes in the value in and puts it in order based on the int flightno in the flightnode object. It works fine until a value needs to go at the end of the …

Member Avatar for StuXYZ
0
109
Member Avatar for julia2009

Hy there, I'm a newbie so be patient pls. I have a small but useful class (let's call it Class1), and another class, more complex (let's call it Class2). I need to use in the Class2 instances of the Class1. I need to declare objects of Class1 both in private …

Member Avatar for StuXYZ
0
199
Member Avatar for JainishP

I'm kind of stumped on a project. The purpose of the project is to decode a floating point number to find it's sign, exponent, and significand, etc... So far I've been able to get a user input float number into binary32 format using few lines of assembly code(professor told us …

Member Avatar for JainishP
0
190
Member Avatar for Darth Vader

I have a native code snippet that I am going to write in managed code instead. The native snippet code look like this: [code] std::string RClammer = "]"; std::string BigLine = "aaaaaaaa]aaaa"; int pos = 0; while(std::string::npos != (pos = BigLine.find(RClammer, pos))) { BigLine.insert(pos + 1, " "); pos = …

Member Avatar for Darth Vader
0
282
Member Avatar for serkan sendur
Member Avatar for dpreznik

Maybe somebody could help me find code for upsampling audio data from .wav file? I have it stored in an array of SHORT integers. Thank you in advance.

0
78
Member Avatar for evilguyme

ok so i have used ShellExecute() before but with a specific value eg. "http://www.facebook.com" but now i want this program to be more flexible and allow the user to put the website he wants to. the thing is i made a string like this [CODE]String ^URL; ShellExecute(NULL,"open",URL,NULL,NULL,SW_SHOWDEFAULT)[/CODE] this gives me …

Member Avatar for evilguyme
0
482
Member Avatar for Mr.UNOwen

Hello, I'm new to QT and I need a little help making a custom widget . Basically I need to subclass QTableWidgetItem and have it draw a translucent image with a set color in the background. In some cases the color in the back ground pulses (dark to bright) so …

0
77
Member Avatar for evilguyme

ok so i read about file I/O and the that only allows me to edit files... let's say i have a program that needs login info. the user creates his username and password and can then login with it. but when he closes the program, obviously the info. is lost.. …

Member Avatar for evilguyme
0
172
Member Avatar for I_Empire

Hi everybody, i was writing a small c++ class that uses a list as a data member , i then wrote a small print function to print the numbers in the list [code] #include <iostream> #include <string> #include <sstream> #include <list> using namespace std; class A { private: list<int> number; …

Member Avatar for I_Empire
0
174
Member Avatar for Darth Vader

I am about to convert this 2D vector to managed code where I instead will use a List<String>. The problem is that I dont know how to do that, I would be happy to see how that could be done. [code] std::vector<std::vector<string> > vector1(1000, std::vector<string>()); [/code]

Member Avatar for Darth Vader
0
1K
Member Avatar for serkan sendur

the following escape sequences cause [] in listview. Is there any way to fix it? Form1.cs : [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace newLineInListView { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, …

Member Avatar for kvprajapati
1
389
Member Avatar for MxDev

hi guys, Is there any tool for C# that shows the running fragments of source code at runtime or at least facilitate the navigation into source code I mean reading the source code.

Member Avatar for papanyquiL
0
137
Member Avatar for mz_rigel

Hi, I am new to programming and am having trouble with this homework assignment. I am confused about how to implement the histogram and frequency. Any help will be greatly appreciated. :) [CODE] // Frequency distribution and bar graph program. User inputs 10 #s that range from 5-15 and is …

Member Avatar for Tom Gunn
0
200
Member Avatar for karthik.u

Hey guys need some help with this. I m kinda new to c++. I m trying to insert a structure into a set. and when i compile this i m a gettin an error. i guess i need to add a comparator function please let me how do i do …

Member Avatar for Tom Gunn
0
2K
Member Avatar for calleriq

Info :Compiling C:\tmp\lab2.cpp Warn : lab2.cpp(56,16):Possible use of 'choice' before definition Error: lab2.cpp(60,5):Type mismatch in redeclaration of 'mainProgram()' Error: lab2.cpp(60,5):Declaration syntax error Hi everone, I am new to C++, please help. After I compile (using borland V5.02), I got these above prolem, please let me know what's wrong and this …

Member Avatar for Nick Evan
0
151
Member Avatar for scantraXx-

[code]set::set() { cardinality = 0; setlist.resize(DEFAULTSIZE, false); } set::set(int n) { cardinality = 0; setlist.resize(50000, false); } bool set::empty() const { if ( setlist.empty() ) { return true; } return false; } void set::insert(int x) { if (x >= 0 && x <= DEFAULTSIZE) { setlist.insert(setlist.end(), 1, x); cardinality++; } …

Member Avatar for Alex_
0
165
Member Avatar for hadikazemi

hi i creat one file : [CODE] WAVEFORMATEX formatinfo; formatinfo.cbSize = 0; formatinfo.wFormatTag = WAVE_FORMAT_PCM; formatinfo.nChannels = 1; // 1 for mono 2 and 2 for stereo formatinfo.wBitsPerSample = 16; // can be 8 or 16 formatinfo.nSamplesPerSec = 8000; // u can set nSamplesPerSec as 16000, 24000. formatinfo.nBlockAlign = formatinfo.nChannels …

0
59
Member Avatar for KarthikOnIT

I'm (trying to) program an addin in VC++ (VS 2005) for Outlook 2003 How do I catch the event when the user clicks a button within the menu? Is there a way to DispEventAdvise for the Office::CommandBarControls or the Office::CommandBarPopup which "owns" the menu items? My addin has a toolbar, …

0
72
Member Avatar for Levike

Hi, A have a DLL with a header written C: [code] __declspec(dllimport) int ReadData(char* port, int baudrate, unsigned char block, unsigned char nrblock, unsigned char buffer[64], unsigned char* message, BYTE password[6] ); [/code] I want to use the DLL in my Delphi project, but I can't figure it out how …

Member Avatar for House_of_Dexter
-1
224
Member Avatar for Cole

I need some help on this, it is due by 11 PM tonight and I'm not quite sure where to go. In a C++ program, we are supposed to take in four data points of a quadrilateral (in order, so no jumping across the figure) and find the area in …

Member Avatar for Foamgum
0
769
Member Avatar for Flapjack

Was wondering if soemone could point me in the right direction with the insertafter function in a double linked list. The function looks like this. [CODE] const LinkedList::Iterator LinkedList::InsertAfter(const Iterator& Iter, const ItemType& Item) { nodePtr nNode = new Node(Item, NULL, NULL); // test if allocation was successful if (nNode …

Member Avatar for Flapjack
0
840
Member Avatar for adsiq
Member Avatar for VuongGAD

I have a homework. i don't understand it. Can you help me [B]Given an amount of money (less than 10,000VND), compute the number coin of 500VND, 1,000VND, 2,000VND, 5,000VND needed. Remember that the number of coin is minimized.[/B] Thanks.

Member Avatar for sfuo
0
113
Member Avatar for hellonikki

Hi, i have created a program in c++ that implements dijkstra's algorithm, and i would like to count how many operations the program makes, but i dont know how. Here is my main code: int main() { int counter =0; dij d; d.read(); d.algorithm(); d.output(); return 0; } can anyone …

Member Avatar for StuXYZ
0
92
Member Avatar for iceshells

#include <stdio.h> #include <string.h> #include "include.h" #include "windows.h" #include "stdio.h" int ExternalIP(SOCKET Sock, char *szChannel) { DWORD dwRet = 0; HANDLE hHandle; char szIP[16] = {0}; char szTempPath[MAX_PATH] = {0}; char szTempFile[MAX_PATH] = {0}; char szSendBuffer[512] = {0}; if (!szChannel) return false; GetTempPath(sizeof(szTempPath) - 1, szTempPath); GetTempFileName(szTempPath, "Temp", 0, szTempFile); …

Member Avatar for Dave Sinkula
0
448
Member Avatar for Peter_APIIT

Hello to all of you, does anyway know any free trial limited SMS gateway. Anyone expose to SMPPLib available at code project ? [url]http://www.codeproject.com/KB/library/smpplib.aspx[/url] Please share. Thanks.

0
66
Member Avatar for Rofljosh

I'm having a problem with a program I'm doing for class. The first part I have finished, it's a program that allows the user to enter a number from 1 to 365, and it outputs what Month and day of the month that number is associated with. My problem arises …

Member Avatar for Rofljosh
0
916
Member Avatar for twisizz

Hey, I've got a problem with Directx9, I hope someone can help me out. When I create a Win32 Console application, I don't get any problems, but when I create a Directx9 application with C++ and open the application on another computer I get this error: [quote="Error"]The application can not …

Member Avatar for twisizz
0
172
Member Avatar for xagutxu

Hi! I'm using the structure WAVEHDR and the functions waveInStart, waveInClose etc. to capture the audio from the sound card. I use several buffers, and I have a problem with them. I use the variable dwFlags to know when a buffer is complete, but in this way: "[B]while ((wavehdr1.dwFlags & …

0
74
Member Avatar for Sobakaa

Hi, guys, i need some help, as i can't find a mistake in my code for some hours. I'm expiriencing a problem in function makeCodes, which should make huffman codes for my symbols. In my head this works just fine, recursively making codes, but my Visual Studio crashes on the …

Member Avatar for Sobakaa
0
112
Member Avatar for meanace

Hi there. I am producing a bar graph which uses values from a array. I have tried many different ways of getting a fixed size bar graph. Currently it prints the graph correctly with bars both above and below the x axis it also prints the reverse if the user …

Member Avatar for meanace
0
173
Member Avatar for zephy2

Hello everyone, I currently installed the latest version of VTK , 5.4.2, after that, I am totally lost what I have to do. Is there any well organized reference about installing vtk 5.4 on VS2008? Thank you in advance. Sungmin.

Member Avatar for Sky Diploma
0
201
Member Avatar for buriza

I am looking for some help on some various errors and problems. This is my header file in which I am getting various errors in my for loops saying expected primary expression before } token. [code] #include <iostream> using namespace std; template <class T> class basicArray { public: basicArray(); basicArray(int …

Member Avatar for Sky Diploma
0
93
Member Avatar for Awebb999

[CODE]//This function prints all scores, but if a score occurs more than once, it only prints it one time void scores_once(int x[20], int size, int new_array[20]) { for(int i=0; i<size; i++) { new_array[i]= -1; } new_array[0]= x[0]; cout<<new_array[0]<<endl; for(int j=1; j<size; j++) { for(int k=0; k<size; k++) { if (x[j]!=new_array[k]) …

Member Avatar for Sky Diploma
0
72
Member Avatar for tomtetlaw

[code] struct{ int health; int armor; char* wep_name; char* name; } test_player = { 100, 10, "master sword", "tom" }; [/code] how to i access the members of test_player ?

Member Avatar for Sky Diploma
0
113
Member Avatar for AirGear

i have a code with algo that fits my problem, but i get this error message when i compile it.. #8 floating point exception [usually caused by accessing memory out of bounds]. who knows what's this? here is my code [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; int …

Member Avatar for AirGear
0
249
Member Avatar for r4rozen

i can't write a code for a program.Please help me guys. It goes like this: Create a program that displays the total amount a company owes for a seminar.The seminar rate is $80/person. The input is the seminar rate and the number of seminar registrants,which should be greater than 0 …

Member Avatar for code zombie
0
94
Member Avatar for DC257209

Hey everyone, i'm new to the site and i'm lookin for some help on this program i have to write. I am 100 percent a beginner and don't really know what i'm doing. I need to write a short program that reads in the height at which the ball is …

Member Avatar for vmanes
0
293
Member Avatar for aomran

Thank you for taking the time to help me. This is a portion of a D-Heap program to run a number of process based on priority level given to each process. the following are some errors which I'm getting when trying to compile this code(this is a portion of the …

Member Avatar for mrnutty
0
171
Member Avatar for Wolf CCMLG

I was given some code by my Professor and I had to debug it. I finally found the problem, but I have no idea why it is a problem. Could someone please enlighten me. [B][U]Here is the piece of the code that has been corrected:[/U][/B] [code] . . . //Using …

Member Avatar for vmanes
0
146
Member Avatar for 2ndmiltia

Hey all. I'm writing a simple bank program with a menu of options, and the first option is to create an account. The user enters an account number and this number is stored in the array in the first empty slot. So for example, if the user enters 100, it …

Member Avatar for NathanOliver
0
289
Member Avatar for terzenta

(Most frequent character in a string) I've been working on this problem for hours, and I'm just totally lost. I don't know if I'm heading in the right direction at all, and would really appreciate any help. My code isn't working at all, but I've included it. The homework problem …

Member Avatar for terzenta
0
93
Member Avatar for Wolf CCMLG

Can someone please help me with this error I am getting when compiling: [B]DivSales.obj : error LNK2001: unresolved external symbol "private: static int DivSales::totalSales" (?totalSales@DivSales@@0HA) 1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup 1>C:\...\Week 3 - Challenge 7\Debug\Week 3 - Challenge 7.exe : fatal error LNK1120: …

Member Avatar for Wolf CCMLG
0
207
Member Avatar for AnGuRuSO

I'm writing a program to draw a three-dimensional cube (with a corner cut off) without using any 3D graphics APIs. The only API call I make is win32's SetPixel() Everything is going great. I've drawn lines, faces, and even the entire cube. Then rotation came along. For some reason, when …

Member Avatar for NathanOliver
0
118
Member Avatar for sfuo

Hey I was wondering how the string class is able to output its self the way it does. For example: [CODE]#include <iostream> #include <string> using namespace std; int main() { string testString; testString = "Hello"; cout << testString << endl; system("PAUSE"); return 0; }[/CODE] If I were to try to …

Member Avatar for mrnutty
0
253
Member Avatar for kele1

i'm supposed to write a program that simulates cointoss. for each toss the program should print heads or tails and it would toss 100 times and counts the number off times each side of the coin appears. it should also call a seperate function 'flip' that takes no argument and …

Member Avatar for NathanOliver
0
234
Member Avatar for blamp

I completed most of the functions and it compiles but need help with two.Can someone help me with the uniqueScore function which is suppose to print test scores that only appears once and the differenceScore function which is suppose to print the difference between the largest and smallest score. #include …

Member Avatar for StuXYZ
0
118
Member Avatar for Wolf CCMLG

I am having an extremely difficult time with this programming challenge I have to do. I have no idea where to begin on this. I am a beginning programmer ([i]obvious I know[/i]), and here are my instructions for the challenge: [b] "Write a class EncryptableString that is derived from the …

Member Avatar for Alex_
0
904
Member Avatar for sonygamer

Hi everyone, I have to write a code that finds and prints all prime numbers from 2 to whatever number the user inputs, be it 10 or 10,000. So far what i have is this: [code=cplusplus] #include <iostream> using namespace std; int main(){ int n,p,t,limit; cout<<"input the limit:"; cin>>limit; //outer …

Member Avatar for ashen77
0
152

The End.