49,767 Topics

Member Avatar for
Member Avatar for habib_parisa

Dear all, I have to use a funny structure in my code which has a 2D array and allocate it later in the program. I do it but I get error which is written below. I have urgently to finish this part of the code. Would be agreat help if …

Member Avatar for VernonDozier
0
396
Member Avatar for lethal.b

iam a noob at c++ and trying to learn it so go easy on me. basically i am trying to enter a some letters such as 'helody' and then check the letters it has in it and place the remaining letters of the alpahebet after it. so afterwords it would …

Member Avatar for jonsca
0
112
Member Avatar for Buttacup

Hi! I've been looking through online materials on this matter with no concrete definitions of what I can do with this. I am trying to export some of the functions from my class residing in my executable. I have tried every which way I can imagine but the variables I …

Member Avatar for Buttacup
0
266
Member Avatar for charqus

Is there any function like this ? [url]http://wiki.sa-mp.com/wiki/Strmid[/url] Thank you :icon_cheesygrin:

Member Avatar for tetron
0
680
Member Avatar for reeddp1

First time poster, but longtime lurker. I've solved a million other problems with other threads, but this time I'm still stumped. My program is meant to take an array of dates and be able to change them, add days, and resize the array. It compiles OK, but I get a …

Member Avatar for Fbody
0
666
Member Avatar for Icebone1000

Hi, thats very weird..if I pass my RECT by reference notting wrong happens, bu if I pass by value, the numbers get crazy. The correct values are: {top=159 bottom=480 left=400 right=640} What I get passing by value is: {top=0 bottom=1 left=1964816 right=1058984360} This happens at the first moment it enters …

Member Avatar for Ancient Dragon
0
185
Member Avatar for fhast

hi, everyone i want to ask about EOF in C++ when i learn C to use EOF in my code is like this : [CODE] while (scanf("%d",&a) != EOF){ statement ... } [/CODE] but, when i use in C++ { [CODE] while ((cin >> a) != EOF){ statement ... } …

Member Avatar for strmstn
0
133
Member Avatar for sasaB

[code] #include <iostream> #include <string> using namespace std; class GuessAccount { private: string guestname; int guestid; double internetbill; string entrydate; int nodays; int noguest; double presentfees; double totalfees; public: void setguestname(); void setguestid(); void setinternetbill(); void setentrydate(); void setnodays(); void setnoguest(); void setpesentfees(); void settotalfees(); void displayinfo(); }; //implementation section …

Member Avatar for strmstn
0
72
Member Avatar for BobC22

Hi im continuing to practise for c++ for when I go to uni next year and i have a problem with a practise example I have been given. I have set it up so the user can define the shapes and size etc, but I am unable to work out …

Member Avatar for mattjbond
0
825
Member Avatar for iamvish

Hi ,, I am using [B]GetProcessMemoryInfo[/B] windows api to get current memory usage by process.. It takes [B]PPROCESS_MEMORY_COUNTERS[/B] pointer as argument. I got value values in [B]PPROCESS_MEMORY_COUNTERS[/B] structure member after calling this api.. but what is the actual memory consumed by my process........ Is it [B]Working set size[/B] or [B]Page …

Member Avatar for tetron
0
172
Member Avatar for silvert122

Please could someone help me? my merge sort code is not sorting properly. this is the code: [CODE]#include <iostream> #include <string> using namespace std; void mergeArray(int a[],int sizeA, int b[],int sizeB,int result[],int *size); void display (int c[],int num); int main () { int a[]={45, 88, 12, 23, 65 }; int …

Member Avatar for tetron
0
131
Member Avatar for team_ferrari22

Hi All, Does anybody know how to [B]defragment windows registry[/B]. We googled and found several free tools doing the same.But no tool is having open source. One tool is there - '[U]UltraDefrag[/U]' which is open source tool written in 'C' for file defragmentation. Please provide help in searching open source/ …

Member Avatar for team_ferrari22
0
101
Member Avatar for wilko1995

How do i make a code so that i can open a file if the person that is using it types 1 for yes or 2 for no Heres my code, [CODE]#include <iostream> #include <fstream> using namespace std; int main(){ // for logging in int Pass, Name; Pass = 159876; …

Member Avatar for Ancient Dragon
0
201
Member Avatar for CreativeCoding

I'm stuck with goto. I need to stop cause sometimes, it screws up my code. I used to do something like this. [CODE] int command; start: command = NULL; // this was a random guess to see if it would work cin >> command; if(command == 1){ cout << "Your …

Member Avatar for mrnutty
0
121
Member Avatar for ultrAslan

Hi, all I am trying to write a code for root test. I'm trying to do it recursively. For instance, If n = 25 and r = 2 then.. the domain is from 1 to 25 first it will add first number and last number which is 26 and divide …

Member Avatar for mrnutty
0
95
Member Avatar for XStrong

Here's my code: [CODE]#include <iostream> using namespace std; int Factorial(int n) { int total = 1; while(n!=0) { total = total * n; n--; } return total; } int Combinations(int n, int k) { int count = 1; for(int i=0; i<n; i++) { for(int y=0; y<(k-i); y++) { cout << …

Member Avatar for VernonDozier
0
128
Member Avatar for tarheelfan_08

Can someone please advise me as to why my assignment is not working? I am doing the exact same thing I did on another assignment and for some reason it wont work. Assignment 1. You are a programmer that works for a local bank. You are creating classes to be …

Member Avatar for thomas_naveen
0
204
Member Avatar for sid78669

I have been working on a template class for linked list and sometimes I come across this member function: [CODE=C++] template <class T> bool DLList<T>::deleteData(T data) { ListNode<T> *temp = head; while(temp != NULL && temp->data != data) temp = temp->next; if(temp == NULL) return false; else{ temp->previous->next = temp->next; …

Member Avatar for sid78669
0
95
Member Avatar for Andy_Ballard

Hello, I would like to import and call a c++ library from python. The library is the freely available (c++) LAMMPS Molecular dynamics code, and on the website, the following advice is given: "[one can]...build LAMMPS as a library. Once this is done, you can interface with LAMMPS either via …

Member Avatar for Andy_Ballard
0
3K
Member Avatar for dola91raw

I know that im not supposed to write like this but i just want to know how to sort 4 random chosen numbers (chosen by pc) in ascending order. Just the basic insert. Imstill abeginnerand cant use arrays!

Member Avatar for WaltP
0
68
Member Avatar for sid78669

I have the following classes, SLList, an integer datatype-based linked list and DLList, a template-based linked list. My problem is that SLList is working perfectly, but as soon as i modify it to be used as a template, i get errors, more specifically LNK 2019, i.e. linking errors. I avoided …

Member Avatar for sid78669
1
637
Member Avatar for sid78669

I am trying to compile a code that utilises an array of 5 'hotel' objects as below: [CODE=C++] #include "Hotel.h" using namespace std; int main() { Hotel *hotels = new Hotel[5]; hotels[0] = new Hotel("Hershey"); hotels[1] = new Hotel("Milton"); hotels[2] = new Hotel("Sheraton"); hotels[3] = new Hotel("BestWestern"); hotels[4] = new …

Member Avatar for sid78669
0
158
Member Avatar for silvert122

Hello guys, i am trying to write an insertion sort program with any values entered by any users but im getting some weird numbers. could someone help me see what s wrong with my code. this is my code: [code]#include <iostream> using namespace std; int main() { int a,b,c,d,e,f; int …

Member Avatar for silvert122
0
163
Member Avatar for Galf

Hi guys, I'm writing a simple function to return the file portion of a path. Strangely, the results I'm trying to duplicate accept something like a/b/c\d\e\file as a valid path, so I'm really just searching for the last occurrence of a slash or backslash. Anyhow, I'm curious what your thoughts …

Member Avatar for Galf
0
164
Member Avatar for Flow2

Hey I've been studying c++ for about a week and I do find myself with most codes to be a quick learner and I know pretty much all there is to cout so I decided to move on to the real stuff. But I wanted to use writeProcessMemory to edit …

Member Avatar for Fbody
0
90
Member Avatar for Christoph928

Need help with my code its not stopping once the correct answer is given i don't know why please help...I'm using 25 as the seed and the answer is 62 but my code says 62 is too high ... thank you.[CODE]#include <iostream> #include <cstdlib> using namespace std; int testTheGuess(int ,int); …

Member Avatar for Lerner
0
116
Member Avatar for xcarbonx

I'm making a program which outputs the min, max and average for any specified user input of numbers, for example a sample output would be: Enter a choice (0 for max, 1 for min, 2 for avg, 3 to quit): 1 How many numbers?: n numbers Enter n numbers: 1 …

Member Avatar for strmstn
0
112
Member Avatar for mbrinkley

Hello. I am an IT major at Arkansas Tech University. I just began programming this semester. I have been given an assignment to give a bank customer certain information about their account and charges. So here is a shortened version of the question: There are two types of accounts: Checking …

Member Avatar for mbrinkley
0
156
Member Avatar for matharoo

I am making a project of Railway reservation system. I want to input time of Train arrival and departure as hours and minutes. Now i want both of them to be entered in same line, first hours and then minutes but in same line i.e the cin should not go …

Member Avatar for WaltP
0
227
Member Avatar for er.chiraggupta

[code] std::ifstream in("chirag.txt"); char k[10]; in>>k; QString ch=QString(k); ui->mes->setText(ch); //mes is a Qlabel //ui is Qwindow object } [/code] /*Qlabel is showing nothing ... Please tell what is wrong with the above code */

0
53

The End.