49,761 Topics

Member Avatar for
Member Avatar for Zvjezdan23

My code has a successful build, but when I run it and type in my 5 numbers, it breaks. Any clue as to how I can fix it??? Much help will be appreciated. [CODE] #include <iostream> #include <sstream> #include <string> #include <ctime> #include <cmath> #include <math.h> #include <algorithm> using namespace …

Member Avatar for thines01
0
120
Member Avatar for GeekZu

Hello I'm doing my project in C++ now. It's a Student Report Card Generator. So here's what I plan on doing: The file structure: ROOT/// --> Report.exe --> System Files -------> License.dat -------> ReadMe.txt --> Reports -------> Report 1 -------> Report 2 . . So, when the program is run, …

Member Avatar for eddiecrosby
0
902
Member Avatar for thecoolman5

hi, I am trying to make a variable equation solver using DEV-C++. I just need to know how to get C++ to solve an equation inputed by the user. So you input something like 1+1 and i need it to solve the problem and output the answer. heres an example: …

Member Avatar for eddiecrosby
0
4K
Member Avatar for james6754

I have explicity declared my array to be 450 characters long. But for some reason when I run the program I seem to be getting about 475 characters and they are all -52(ascii) from 450 to 475. I also do not seem to have a null character in my array …

Member Avatar for thines01
0
116
Member Avatar for tomtetlaw

I'm using VC++ 2010 and Window 7 64-bit. In my project, I have 2 DLLs and one EXE (all being build 32-bit). They're all using the same runtime library (Multi-Threaded Debug) and I have checked that nothing is being deleted twice. I'm fairly sure that nothing is being allocated in …

Member Avatar for daniel.bonetti
0
3K
Member Avatar for shalini shekhar
Member Avatar for WaltP
0
173
Member Avatar for Candace Parker

Sudoku in C++. The program works but how do I check the minisquares? Please gimme a function. :( Pretty please? [code] #include <iostream> #include <iomanip> using namespace std; const int rowSize=9; const int columnSize=9; const int arraySize=9; int a[arraySize]; int print_values[rowSize][columnSize]={9,4,2,5,1,8,3,7,6, 7,1,6,4,2,3,5,8,9, 3,8,5,7,6,9,4,2,1, 1,6,3,8,4,2,7,9,5, 4,2,7,1,9,5,6,3,8, 8,5,9,6,3,7,2,1,4, 6,3,8,9,7,4,1,5,2, 5,7,4,2,8,1,9,6,3, 2,9,1,3,5,6,8,4,7}; bool …

Member Avatar for WaltP
0
392
Member Avatar for demigodz24

C++(pointers) problem reads input strings from a file and that replaces all the vowels to the '&' character INPUT: file.in Hi there! Hi Damon!!! Hello. OUTPUT: file.out H& th&r&! H& D&m&n!!! H&ll& c++ program... just implement it to pointers... ATTENTION: PLEASE GIVE ME SAMPLE CODE SAME WITH THE PROBLEM SO …

Member Avatar for WaltP
-1
363
Member Avatar for freedomflyer

I am trying to pass some url information into tokenize_urls from process_and_display_information. To get things up and running, I am simply trying to return and retain some array data from tokenize_urls into process_and_display information. However, I am running into an issue where the variables are created and sent back from …

Member Avatar for Ancient Dragon
0
182
Member Avatar for croussou

Hi guys, I have developed this quite basic calculator based on windows forms and I was wondering whether there is a way to block any user input that is not a number. I am using two TextBoxes for getting the user input, then converting those string values into doubles for …

Member Avatar for BobS0327
0
136
Member Avatar for Diogo Martinho

I made a function that would allow me to get the current date and put it on a string in YYYY.MM.DD format. [CODE]string Date::getCurrentDate(){ char datenew[8]; char currentdate[8]; string s; int size; _strdate(datenew); currentdate[0]=datenew[6]; currentdate[1]=datenew[7]; currentdate[2]=datenew[5]; currentdate[3]=datenew[0]; currentdate[4]=datenew[1]; currentdate[5]=datenew[2]; currentdate[6]=datenew[3]; currentdate[7]=datenew[4]; size=sizeof(currentdate); s.assign(currentdate,size); return s; }[/CODE] I keep getting a …

Member Avatar for Diogo Martinho
0
112
Member Avatar for Idestruction

Hey all! I am writing an application that will read data coming in through a serial port (RS232) and write that data to a file. This file will then be parsed by a php script and the data will uploaded to a server. Is there a function that allows me …

Member Avatar for L7Sqr
0
280
Member Avatar for cangan

Hi, i am adding a few lines to the multiline textBox in a Windows forms Clr application. However each and every time the vertical scrollbar goes to the bottom. How/Can it be stopped ?? [CODE] textBox1->AppendText(array[i]); [/CODE]

Member Avatar for thines01
0
159
Member Avatar for FierstArter

I've looked around for about an hour and can't find anything that was to terribly helpful, or I didn't know how to use it. So here it is. [CODE]#include<iostream> #include<new> #include<cstdlib> #include<string> using namespace std; struct student { string name; double gpa; }; student doSurvey(student s); void reportSurvey(student s); int …

Member Avatar for FierstArter
0
266
Member Avatar for siabenie

I am a bit confused here; I have this expression [CODE] ! (1 && !(0 || 1)) [/CODE] What would this evaluate? I tried to see it in logic as I go the steps: NOT (1 AND NOT(0 OR 1)) //0 NOT 1? what is this mean? How I can …

Member Avatar for siabenie
0
112
Member Avatar for sakthi_perumal

Hi All, I am using system function to invoke a jar file in MAC OS. But the jar file path has space in the folder name. [CODE] string arg1= "MyWindow"; string jarFile = "java -jar /Users/User1/Desktop/Sample Java/Demo.jar "; jarFile += arg1; system(jarFile.c_str()); [/CODE] "/Sample Java" folder name has space in …

Member Avatar for Sam557
0
122
Member Avatar for PrimePackster

I have written a simple program to save details about a maximum of 20 people using structures. But when i run it, gets gives me error....... Here is the code... [CODE]// Hihi.cpp : Defines the entry point for the console application. // #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { …

Member Avatar for PrimePackster
0
182
Member Avatar for dellat

Hello, I'm looking for c++ api example for ncurses programming and needless to say that it is not available except 7 part snake game development video on youtube which is a bit difficult for a noob like me to understand. GNU ncurse 5.9 documentation heading states that it has c++ …

Member Avatar for dellat
0
592
Member Avatar for Torf

Hello, I do not understand the following parts in bold - how it works, what is is for..etc. I'm not following the book's explanation.. [CODE]#include <iostream> using namespace std; [B] double totalCost(int numberParameter, double priceParameter);[/B] int main( ) { double price, bill; int number; cout << "Enter the number of …

Member Avatar for MandrewP
0
282
Member Avatar for freedomflyer

For some reason, whenever I try to find a slash at the end of a byte string (in this case, base_url which is set to "www.google.com/"), it doesn't seem to want to return that it is or isn't there. However, if I change base_url to something like "www.google.com" where m …

Member Avatar for freedomflyer
0
202
Member Avatar for thecoolman5

hello, I am writing a variable equation solver. Now to get it to work, i just need your calculator to be able to detect random strings instead of numbers. and when it does, i need to assign a random number to that string and have the calculator solve the problem …

Member Avatar for thecoolman5
0
219
Member Avatar for thecoolman5

hi, I have this code: [CODE]#include<iostream> #include<cstdio> #include<sstream> using namespace std; int main (char argc) { float n1; char operators; string n2; float n2_act; float ans; cin >> n1; …

Member Avatar for thecoolman5
0
267
Member Avatar for thecoolman5

hi, I am making a calculator and i need a function that can detect a char in a string. In other words, i need it to detect a NON-number.[CODE]string n1 = "35+66/7"; int pos = -1; n1.find(char, pos+1); cout << char.n1_find << " was found at "<< pos << endl; …

Member Avatar for thecoolman5
0
626
Member Avatar for siabenie

Hi all, Can anyone explain to me in details preferable with an example the different between i++ and i++ please. Here my example with what I understood: [CODE] for (int (0); i<10; i++) { cout << i++; cout << ++i; } [/CODE] What is the output? Is the working steps …

Member Avatar for siabenie
0
169
Member Avatar for Carolin

i have below code , now i want to calculate the frequency of each letter which a function contain an array of alphabets use Pointer to a function principle i want to use pointer to find Frequency .... i have a little bit information about pointer but i don't know …

Member Avatar for thines01
0
288
Member Avatar for hamby

Hi guys, I'm writing a small piece of code that will allow the user to input a sentance, and will return the sentance in all uppercase characters. The problem is, as soon as a "space" character is entered the program considers the input to be finished. I don't understand why. …

Member Avatar for Mr_Null_andVoid
-1
1K
Member Avatar for iamthesgt

In working on a logfile for an application, I needed to limit the size of the logfile to 1000 bytes. Since it is not possible to delete lines from a file in C++, I used the following steps: Rename the logfile to a temporary name. Read the temporary file. Write …

Member Avatar for iamthesgt
0
224
Member Avatar for Chuckleluck

Hello, Here is my example code: [CODE]// Main.h #ifndef MAIN_H #define MAIN_H #include <iostream> using namespace std; #include <string.h> string HelloWorld = "Hello World!\n"; void HelloEarth(); #endif [/CODE] [CODE]// Main.cpp #include "Main.h" int main() { cout << HelloWorld; HelloEarth(); }[/CODE] [CODE]// Secondary.cpp #include "Main.h" void HelloEarth() { cout << HelloWorld; …

Member Avatar for gusano79
0
2K
Member Avatar for Labdabeta

How can I get the coordinates of the output of a truetype font. I need to write a function like so: [CODE]struct CartesianCoord{float x,float y}; CartesionCoord *printfont(const char *filename,char ch, int &len) { /*Read the font in filename.ttf and convert it to a set of vertices describing the resulting shape. …

Member Avatar for Labdabeta
0
251
Member Avatar for gpta_varun

Hi Is there any way , memory leaks can be clogged in c/c++ ... Are there any good tutorials on how can we make our code Memory Leak free ??/ Best Regards -Varun

Member Avatar for MastAvalons
0
203

The End.