49,757 Topics

Member Avatar for
Member Avatar for shotjase

i am trying to implement a database of books and i am have to use linked lists and possibly dynamic arrays for the first time so i am a bit confused..i just wanted to know if this is how i should b going about my constructors and if theres anything …

Member Avatar for Cybulski
0
111
Member Avatar for Thew

Hello, I'm trying to use some default (static) members for my class. At first I've created class which looks like this (this is just a small code): [CODE] //rozšírenie materiálu, M (par (ext)) typedef struct ExtendedMaterial { //hmotnosť float Substantiality; //krehkosť - tuhé látky, viskozita - tekuté látky float Insubstantiality; …

Member Avatar for Thew
0
92
Member Avatar for Cosa

Hi, I am having a problem with returning a 2d array back to the main in my program. The program reads in a matrix from a file, then it has to multiply etc, however i cannot get the print function to work since the array that is made in the …

Member Avatar for Nick Evan
0
145
Member Avatar for Race

hi i ave an assignment on point of sale terminal where i have to write a program so that it displays the product ID, amount of product , cost of each product and then the total cost. the following code shows how i've started it. Could some one tell me …

Member Avatar for Nick Evan
0
75
Member Avatar for sagz

Hi all, I have a program that reads a text file and counts the frequency of phrases, for phrases up to ten words long. I solved a problem with printing out phrases that occur more than once, however I have discovered that my program reads punctuation marks and includes them …

Member Avatar for sagz
0
172
Member Avatar for dougy83
Member Avatar for GPXtC02

New to classes. Getting alot of errors when calling the private member variables (from down in main). Most are telling me either i can't access the private member variable IDs or the other member variables i'm attempting to access (debit, credit, balance) are undefined ('identifier not found'). Also getting 'overloaded …

Member Avatar for GPXtC02
0
127
Member Avatar for CoolGamer48

Hey, so I have a file I use to store my own math functions called MyMath.h. I included MyMath.h in my main.cpp file and it worked fine. But then I tried including it to another file, and I get this error: Block.obj : error LNK2005: "int __cdecl Random(int,int,bool)" (?Random@@YAHHH_N@Z) already …

Member Avatar for CoolGamer48
0
168
Member Avatar for c++noobie

I have been teaching myself c++ for a little while now and came across something I couldn't figure out. I am trying to figure out how many char*s there are in a char**. In the current program I am using *argv[], so I can access it through argc, but is …

Member Avatar for Ancient Dragon
0
85
Member Avatar for Aamit

I want to run Exe after 1 minute when computer starts Means suppose comp starts at 10:00:00 pm my exe automatically executes at 10:01:00pm How to do it through program??

Member Avatar for Duoas
0
94
Member Avatar for Nemoticchigga

I am having an issue with the following code: [CODE]SerialPort^ com = gcnew SerialPort("COM1", 9600); array<unsigned char>^ messageBuf = gcnew array<unsigned char>(512); com->Open(); com->Read(messageBuf, 0, 512); com->Close(); [/CODE] messageBuf is not being filled with anything. I know the port is open cause writing works fine. Any ideas why this is?

Member Avatar for tesuji
0
98
Member Avatar for JohnnyC26

I am creating a book database using C++. I am using a book structure which contains all the information for each book that I create. The problem I am having is that I want to be able to search the file I am printing the books to for a specific …

Member Avatar for tesuji
0
96
Member Avatar for tiney83

I'm stuck on figuring out the best to do this assignment. I need to it with either a single array or a 2d array, no structs or classes or anything. Should i just have a 20x8 array and enter the data that way? A company has records for the hours …

Member Avatar for Ancient Dragon
0
98
Member Avatar for En1ro

[CODE=c++]int j=1; fstream kd("Gydytojai.sed"); while (!kd.eof()) // Checking if the entry already exist; { if (gydmas[j].vardas==pgyd.vardas) {ShowMessage(L"Gydytojo id jau egzistuoja"); pagalb=true;}; // if the entry exist, variable pagalb becomes true j++;}; kd.close(); [/CODE] Well, i'm checking if in the file Gydytojai.sed while it is not end of line checking if …

Member Avatar for En1ro
0
104
Member Avatar for marcelomdsc

Hi, this is my first time posting to this forum so please let me know if I'm doing anything wrong. I would like to know how to do the following... a. Write the internal representation of “17” in ASCII using two binary numbers b. Write 17 and -17 in two’s …

Member Avatar for marcelomdsc
0
98
Member Avatar for latour1972

Write two program segments (functions) that accomplish each of the following: a) A function that Calculates the integer part of the quotient when integer a is divided by integer b. b) A function that Calculates the integer remainder when integer a is divided by integer b. Use the functions developed …

Member Avatar for latour1972
0
104
Member Avatar for Blondeamon

Hello guys under a project i have to complete for this semester i have to think and implement a shortest path algorithm other than the ones i have already coded so far for this course , which are: - Bellman Ford - Floyd - Kruskal The whole project is a …

Member Avatar for Blondeamon
0
118
Member Avatar for architact

Please help me in doing this problem in C++ without filing ______________________________________________________________________ [code=cplusplus] #include<iostream.h> #include<conio.h> #include<stdio.h> #define min(a,b)((a)<(b)?(a):(b)) int a[6000]; main() { file*input=fopen("number.in","r"); int n,p2,p3,p5,p7; a[1]=n=p2=p3=p5=p7=1; while (a[n]<2000000000) { a[1+n]=min4(2*a[p2],3*a[p3],5*a[p5],7*a[p7]); if (a[n]==2*a[p2]) p++; if (a[n]==3*a[p3]) p++; if (a[n]==5*a[p5]) p++; if (a[n]==7*a[p7]) p++; } { fscanf(input,"%d",&n); if (n==0) break; printf("the%d",n); if …

Member Avatar for DigitalPackrat
0
155
Member Avatar for joshmo

am trying to figure out how to insert a new number in a linked list after a specified number...i am failing to figure out how to fix in the number in the list...here is the partial code..any help is appreciated [code=cpp] void insert(detailsPtr& head) { detailsPtr prev, current,tmp; int num,curr_num; …

Member Avatar for joshmo
0
79
Member Avatar for shinpad

Hi there, I am very new to C++ so please bear with my what is clearly terrible work I am trying to figure out what should be (I think) a simple program that will check a couple of pieces of information and tailor an output based on the input, if …

Member Avatar for Nick Evan
0
122
Member Avatar for Aamit

I am creating client-server application. client sends text file through `sendto()` function to server. Problems are following-- 1>At the server i am writing into new abc.txt file. but problem is it writes some garbage data also.... server side function ---- char RecvBuf[22610]; int BufLen = 22610; recvfrom(RecvSocket,RecvBuf,BufLen, 0,(SOCKADDR *)&SenderAddr, &SenderAddrSize); …

Member Avatar for Prabakar
0
615
Member Avatar for shadowfire36

ok after somet time im now ready into breaking my code apart into 4 class Sports,NBA,NFL,MLB, here is the original code [code] #include <iostream> #include <fstream> #include <string> using namespace std; // definition of strct that will hold all information of match struct Match { string Season; string Team1; string …

Member Avatar for shadowfire36
0
85
Member Avatar for ryanlcs

Hi There I used to develop C programming some 5 years back using Visual Studio. Now I am on my way to develop C++ using Visual Studio .Net 2003. I started of to create new project, there are numbers of different type to choose (Win32 Console Project, Console Application (.Net), …

Member Avatar for ryanlcs
0
152
Member Avatar for sagz

Hi all, I am a newbie to programming and have almost complete my assignment 'Frequency of words and phrases' to a satisfactory standard. My program reads a text file and counts the number of phrases within the file (A phrase is defined as a sequence of one or more words), …

Member Avatar for sagz
0
154
Member Avatar for savinki

This is the code segment I hv written. But its compiling well. but it doest give expected output, for me.. I want to write a function to split a char array by taking "," as the delimeter. I m not splitting the array at once. I m doing it one …

Member Avatar for Agni
0
100
Member Avatar for Dannyo329

Hey Everyone. Is there any way to make a sub? For example there's int main(), can I make something else like int menu() and sort of link int main to int menu? I have no idea how to do this.:-/

Member Avatar for Laiq Ahmed
0
155
Member Avatar for knowledgelover

Hi C++ experts , actually my knowledge is not very good I can call my self degree 2 beginner , But I know how to do things in C#, and write now I need to execute what I have already done in C#, in a c++ code. MORE EXPLANATION : …

Member Avatar for mitrmkar
0
391
Member Avatar for freshface001

hi friends, can posible to connect ms-access or sql database with c++ ? if posible tell the tips to do it......

Member Avatar for Nick Evan
1
69
Member Avatar for Traicey

Can anyone explain how bubble sort work or give an example or a simple code that is bubble sorting Thanx in advance

Member Avatar for DigitalPackrat
0
399
Member Avatar for nurulshidanoni

this is the sample program of selection sort, which is given the value. But, how to call the value from read file? anybody knows? [ICODE] #include <iostream> using namespace std; void selectionSort(int *y,int n)//selection sort function { int i,j,min,minat; for(i=0;i<n;i++) { minat=i; min=y[i]; for(j=i+1;j<(n);j++) //select the min of the rest …

Member Avatar for Arpy Giri
0
167

The End.