49,757 Topics

Member Avatar for
Member Avatar for MRehanQadri

Can't find out the error. #include <iostream> using namespace std; struct node{ int id; int *next; }; node * get_data(int ); node * get_data(void); void insert_node (node **, node **, node *); void display_data(node *); int main(){ node *head=0, *tail=0, *newPtr=0; newPtr = get_data(); insert_node (&head,&tail,newPtr); display_data (head); return 0; …

Member Avatar for deceptikon
0
192
Member Avatar for capton

Hello everyone! I know QObjects doesn't support copy constructors but how can i create a copy of a QObject. I want to make changes to the object while still maintaining the original copy. Thanks

Member Avatar for deceptikon
0
265
Member Avatar for capton

Hello, my Qt app gives the following run time error > HEAP[testApp.exe]: > QInvalid address specified to RtlFreeHeap( 0D920000, 0F29F1C0 )uoted Text Here But it's free from error when i comment out these lines table->setCellWidget(currentRow,4,wid); table->setCellWidget(currentRow,2,++wid); table->setCellWidget(currentRow,1,(++wid)); Please i need help seriously. for(int i=0; i<currentSem->courses->count(); i++) { QVBoxLayout *vlayer = …

Member Avatar for capton
0
212
Member Avatar for kshahnazari

Hey guys I just learned how to work with header files but I have a simple error . I suggest you guys dont look at gameboard.cpp because it just runs fine with ubuntu and no errors with it. my problem is when I run the main it gives the eroor …

Member Avatar for Moschops
0
278
Member Avatar for sedirox

I need help trying to figure out how to insert into a multi linked list. I know how it works with a linked list with only one piece of data but not 2 pieces with 2 pointers. Essentially what I want to be able to do is creat a multi …

Member Avatar for rioeduardo
0
1K
Member Avatar for narabo

We were assigned the birthday paradox as a homework assignment. The program intakes a number of people to check and returns the number of people with a shared birthday. I seem to be having trouble figuring out the loops for the function check_birthdays. I input a number and a number …

Member Avatar for Banfa
0
297
Member Avatar for eogunlolu

//This program is supposed to read 20 scores from an input file and initialize them to an array //then print the components into 2 separate output files #include <fstream> #include <string> using namespace std; const int ARRAY_SIZE = 20; void printArray1(int scoresArray[], int sizeX); void printArray2(int scoresArray[], int sizeY); ofstream …

Member Avatar for eogunlolu
0
228
Member Avatar for xixi.li.7

I just have a program to implement RSA encryption, and it runs but when I try to encrypt a message it crashes. When I bebug it won't show any error, What is the issue,How Can I fix the program? #include<iostream> #include<cmath> using namespace std; #define MAXLENGTH 500 int size = …

Member Avatar for tinstaafl
0
150
Member Avatar for Engineer001

#include <iostream> #include <cmath> using namespace std; int main () { double n = 1; double sum = 0 ; double previous = 0; double y; while(fabs(double (sum - previous)) > 0.001) { y = -1 (exp(double (n))) / n; **<<<Error is here<<<<** sum += y; previous = sum - …

Member Avatar for Moschops
0
2K
Member Avatar for shanki himanshu
Member Avatar for Ancient Dragon
0
231
Member Avatar for LevyDee

So I have always developed in a 32 bit environment, but now have the opportunity to step into 64 bit development. What I am working on requires a lot of pointer aritmatic, and I am a little confused how primitive data type sizes vary from 32 to a 64bit platform. …

Member Avatar for LevyDee
0
172
Member Avatar for dan.gerald

I am trying to write a program that will test for the birthday paradox. I need to run a series of experiments on randomly generated birthdays, which test this paradox for n = 5, 10, 15, 20,...,100 (n = number of people in any given room). I need to run …

Member Avatar for dan.gerald
0
506
Member Avatar for Alexkid

Hi there, I was wondering if anyone could help me, I’m trying to send various packets of data over network via UDP. I’m using the sendto() function in winsock2. I’m trying to send different data types over UDP, for example; I have positional data such as: int time; float LAT; …

Member Avatar for mike_2000_17
0
6K
Member Avatar for on93

can anyone solve this problem for me ??? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include<iostream> #include<string> #define size 10 using namespace std; struct student { string name; int id; string prog; double cgpa; }; class stinfo { private: student data[size]; int last; public: stinfo(); void add(string name, int id, string prog, double cgpa); }; stinfo …

Member Avatar for Lucaci Andrew
0
211
Member Avatar for awesome_cool

I want to assign a value to the variable x which belongs to the class X using friend function. Is there any way to assign a value, say 30 to the variable x using the friend function. I tried the following code but the output is different. [CODE]#include <iostream> #include …

Member Avatar for NathanOliver
0
223
Member Avatar for andrian.mutua.7

hi, i am very happy that i found this forum :) i am a beginner so, i have some question. if somebody could answer me i will appreciate it. can i write a program for numerical analysis in Turbo C? i have to write program but i don't know where …

1
92
Member Avatar for meetjatin88

which one should be preferable from the following two nested for loops: 1. for(i=0;i<100;++i) { for(k=0;k<10000;++k) { <lines of code> } } 2. for(k=0;k<10000;++k) { for(i=0;i<100;++i) { <lines of code> } } why?

Member Avatar for mike_2000_17
0
189
Member Avatar for buckeyemike

when you write code in the main function if you put functions in the file all you do is nameoffunction(); to call it. now my question is this lets say you have a menu in a class. call it bank. in the main to call that function . ive tried …

Member Avatar for mike_2000_17
0
214
Member Avatar for TheTimeCat

A Very Good Morning to you, Hi and how do you do ? I hope your day is going great. I would like help writing a CPP Function() with the following criteria :- It is to search for 4 digit numbers in a Pick 4 Game. 1. Given a 2D …

Member Avatar for ravenous
0
274
Member Avatar for TheTimeCat

This is a program to generate possible combinations Somehow everytime I run it - in VS2012 I get this error - "Expression:Vector Subscript out of range" ? Can someone please help to get this code working ? A Big Thank You !!! :D #include <iostream> #include <vector> class CombinationsGenerator { …

Member Avatar for ravenous
0
945
Member Avatar for triumphost

http://i.imgur.com/kWrBizl.png In the above Image, I generator a Sudoku Matrix of 9x9 values. Is there any way I can allow user to enter individual values by moving around the caret and typing? Basically, I want them to just be able to change the values displayed on the screen by moving …

Member Avatar for tinstaafl
0
168
Member Avatar for Sci3nc3F1cti0n

I'm writing a program that will keep track of every Anime/Manga I watch/read(I'm an avid fan). I'm trying to make a database in order to keep track of all of the titles of the Anime/Manga. My problem is that when i try to add a new title to the existing …

Member Avatar for Sci3nc3F1cti0n
0
223
Member Avatar for toth.attila.7921

Hi! I want to make a CONVERTER. I designed it, so I just have to program some buttons. The problem that I have is weird. I programmed a button that says : CONVERT TO METER. After I build the program, I get ERROR C1075 : end of file found before …

Member Avatar for tinstaafl
0
846
Member Avatar for meetjatin88

Hello Everyone i am trying to write a program for printing all the combinations of a string.I do not want any help regarding the algorithm but i need help figuring out why this program is giving the error message "First-chance exception at 0x761bc41f in word.exe: Microsoft C++ exception: std::out_of_range at …

Member Avatar for meetjatin88
0
241
Member Avatar for ryan.maure

I am having a runtime error happen when I run my program and can't seem to figure out why. It is happenning on my insertion sort function. I also am going to have to do a selection sort with this and aany help would be greatly appreciated. Here is my …

Member Avatar for ryan.maure
0
293
Member Avatar for wids101

Please enter your starting balance: 200 What would you like to do? B...Show Balance D...Deposit W...Withdrawal Q...Quit B Your balance is 200.000000 Press any key to continue . . . i put my set precision to 2 and it's printing 6 zeros. how come?

Member Avatar for vmanes
0
95
Member Avatar for dhayalanbalakrishnan

Guys I am trying To send a mail using C++ code i found from the net , when i compiled it it says In function `_Z13ChilkatSamplev': [Linker error] C:/Users/dhayalan/Documents/mail.cpp:10: undefined reference to `CkMailMan::CkMailMan()' [Linker error] C:/Users/dhayalan/Documents/mail.cpp:14: undefined reference to `CkMailMan::UnlockComponent(char const*)' [Linker error] C:/Users/dhayalan/Documents/mail.cpp:21: undefined reference to `CkMailMan::put_SmtpHost(char const*)' [Linker …

Member Avatar for Moschops
0
331
Member Avatar for on93

can anyone show me how to convert this linkList statement into Array ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class linklist { private: struct node{ struct student{ // node->info string name; int id; string prog; double cgpa; }st; node *link; }*head; public: void insFirstNode (string name, int id, string prog, double cgpa); }; void linklist::insFirstNode(string …

Member Avatar for on93
0
112
Member Avatar for MRehanQadri

#include <iostream> using namespace std; struct td{ int ** subj_no; }; int main(){ td p; **p.subj_no = new int * [7]; } If not then how should I accomplish this task? What's the corrected version?

Member Avatar for vmanes
0
172
Member Avatar for Chadtims

The End.