49,761 Topics

Member Avatar for
Member Avatar for Ultratermi

Hey, time_t sec = time(NULL); gives me the seconds since 1970. But... It works with the system clock... So maybe the system clock is not synchron on two computers... Is there a way to get the seconds since 1970 WITHOUT the system clock, so that it is synchron on two …

Member Avatar for Ancient Dragon
0
114
Member Avatar for jangab

how to delete a string index inside an array that the user inputs???,, could someone pls help??

Member Avatar for Excizted
0
99
Member Avatar for CreativeCoding

So i'm working on this program. And long story short, I need something that will allow the user to choose the dir/file and have the system set read-only to true. Here is a piece that I worked on. Only it crashes on the system line. [CODE]try { clear; char* dir; …

Member Avatar for thomas_naveen
0
193
Member Avatar for mebob

how would i make a new type of variable, like instead of int or double? would i use classes or something like that?

Member Avatar for Stefano Mtangoo
0
92
Member Avatar for sid78669

OK, so I am redirecting the input from a file. The input is read into a string. The problem is, when the input file ends, the program still reads empty lines and goes into an endless loop. I have added an if statement for it to detect 5 empty entries …

Member Avatar for sid78669
0
137
Member Avatar for theforgotten

i have an insert function: [code=c] template <typename T> void insert(T item) { string T_id = typeid(T).name(); int compare; if(T_id == "char *") compare = stricmp(this.item, item); else compare = this.item < item; // ... insert here } [/code] i'm trying to compare numbers,strings,classes but when T is <char*> i …

Member Avatar for theforgotten
0
137
Member Avatar for calypso8

Hi, I am fairly new to C++ but love to learn, so I wanted to create a simple program base on the group-party game mafia A.K.A "werewolf." Just so whoever is not familiar gets the background. I will use just an example of 10 players. In a ten player game, …

Member Avatar for calypso8
0
1K
Member Avatar for programer25

Hello guys... I wanna write a program that calculates a customer’s bill for the electric company. But there are two types of customers: residential and commercial. There are two rates for calculating an electric bill. Resident rates – Bill processing fee = $12.50 Service fee = $30.50 Alternative energy fee …

Member Avatar for mrnutty
0
88
Member Avatar for bsbomb21

we are suppose to write a nice display code for natural numbers in Resolve its OSU version of C++, everytime I enter code and compile it though i get this error? heres my code [CODE] concrete_instance class Queue_Of_Naturals: instantiates Queue_Kernel_1a_C <Natural_Put_To_With_Commas_1> {}; concrete_instance class Sequence_Of_Queue_Of_Naturals: instantiates Sequence_Kernel_1a_C <Queue_Of_Naturals> {}; …

Member Avatar for jonsca
0
530
Member Avatar for greatunknown

I have a class with private strings and after I set information I want to the given strings in that class I need to push that data to a vector, which is stored privately in a separate class...I feel as though my code makes logical sense but obviously I am …

Member Avatar for greatunknown
0
109
Member Avatar for Jaxzen

So, my assignment is to write a program that puts a password input from the user through various tests and output its level of security. I've not had much training in this as my teacher doesn't really help much, and I'm supposed to do this over spring break. [code] #include …

Member Avatar for vmanes
0
151
Member Avatar for Talguy

I have been coding an IP scanner for god knows what reason. The program kind of works. It does find active computers on the network but for some reason it does not find my computer using its network ip or its internal ip (127.0.0.1). Also it can not find any …

0
69
Member Avatar for piecykoos

hi, can anyone help me with my assignment, I'm new in c++ and any help will be much appreciated: "You must design, implement and test a simple board game. The design should follow object oriented principles and use the UML tools that were introduced earlier in the module. The coding …

Member Avatar for totalwar235
0
833
Member Avatar for steviebax

HI. I'm new to this forum and new to C++ programming so be kind !! I've got a program that reads in a batch load of tif files works on them one at a time and then outputs the files as .png. Problem l have is that the tif filenames …

Member Avatar for steviebax
0
94
Member Avatar for totalwar235

i am trying to create a massive list of letters and numbers using this program. but for some reason i keep getting an error (sometimes this occurs, sometimes it doesn't) [B]error PRJ0002 : Error result 31 returned from 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe'.[/B] i also get(sometimes this occurs, sometimes it doesn't) [B]Unhandled …

Member Avatar for totalwar235
0
144
Member Avatar for twalls16

Im trying to add up 100 grades and get the averge but it wont compile because it "cannot convert from 'int' to 'int [100]. Can anyone help me?? [CODE] #include "stdafx.h" #include <iostream> using namespace std; int main() { int total, j; double average; int grade[100]= (56,97,73,59,68,79,86,67,79,66, 95,64,98,56,79,83,75,89,73,91, 52,72,63,81,62,85,37,78,100,89, 56,89,75,76,99,66,84,98,68,59, …

Member Avatar for twalls16
0
344
Member Avatar for pranay_agg

hi, can someone please tell me the approach i should take to find the distinct substrings of a string ?

Member Avatar for mrnutty
0
518
Member Avatar for nerdinator

I have created a few applications in MFC. But I want to start saving the contents of them to files(just like word,guitar pro or paint). I tried serialization provided by MFC but I didn't like it that much because I couldn't check anything that was saved at all. So,I wrote …

Member Avatar for Ancient Dragon
0
189
Member Avatar for Carrots

Hi, I'm having trouble understanding how I should use pure virtual functions in my inheritance tree. I've drawn a class diagram which shows what I'm trying to achieve: [img]http://i42.tinypic.com/2qjdttd.jpg[/img] Here is what I've written: [B]main.cpp[/B] [code] #include <iostream> #include <string> #include <list> #include "base.h" using namespace std; int main() { …

Member Avatar for mrnutty
0
129
Member Avatar for Faiza_Iqbal

first i had partioned my array into two subarrays. Then the quick sort switches to insertion sort for sorting the small sized subarrays. But the error is logic error, because when i enter 15 inputs, the first and the last inputs are not sorted at all..I think error is in …

Member Avatar for MyrtleTurtle
0
283
Member Avatar for zacory

I'm creating a program that maintains a log file. The file is created at the start up of the program and appended to throughout the run. This works perfectly fine, but I went and manually added the program to run at start up in the registry. The program runs as …

Member Avatar for tetron
0
87
Member Avatar for sid78669

I am using char * for getting data from the user. Now, if i just do [CODE=C++] char * data = new char[100]; cin >> data; [/CODE] The data is corrupted, i.e. only data before whitespace is stored; and the following is an example result: [CODE] enter: "Microsoft Co." data: …

Member Avatar for Geoff_Giraffe
0
278
Member Avatar for ckjie

Hi all, I'm new to this community. I am doing a project that I'd have to write a program to connect 2(at least) PCs together. each PC works as a server and at the same time as a client, which each of them can download the file which is shared …

Member Avatar for strmstn
0
163
Member Avatar for krishnakrmsccs

[B]MAC-LAYER LDA[/B] if (DataRate ≥ 12 Mbps) then // station is closed to AP RetryLimit =6 // default value else if (DataRate > 6 Mbps) // possible signal failure RetryLimit = 12 // begin to enlarge transmission window else if (DataRate ≤ 6 Mbps) // probability of failure is max. …

Member Avatar for Salem
-2
83
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
394
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
109
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
259
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
676
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
655
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
182

The End.