49,757 Topics
| |
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 … | |
| 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; … |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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?? | |
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? | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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; … | |
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 … | |
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); … | |
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 … | |
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), … | |
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), … | |
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 … | |
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.:-/ | |
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 : … | |
hi friends, can posible to connect ms-access or sql database with c++ ? if posible tell the tips to do it...... | |
Can anyone explain how bubble sort work or give an example or a simple code that is bubble sorting Thanx in advance | |
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 … |
The End.