Beginners - November 2012 (Page 30)

Stringy Issues of char* and Unions
 
union scenenames { char names20 ; char names19 ; char names18 ; char names17 ; char names16 ; char names15 ; char names14 ; char names13 ; ...
[no replies]
by Ch1156
Can i make this code easier
 
Is there any way i can shorten this code, also any other tips on things i can do? #include <iostream> #include <string> #include <ctime> #include <rand...
[10 replies] Last: 2cents worth, I began programming a few years before "C" appeared, wh... (by Incis B)
by ghadf
Want to input a name with comma?
 
Hello everyone? I want to know if someone can help me to understand how to input a name with comma and how to check if the user input the name with one comma...
[6 replies] Last: ghadf, You'll run into problems with terminating strings like that. us... (by LGonzales)
Program ends before producing any output.
 
Hi. My program compiles, but when I run it, it immediately closes without producing any output or getting any input from the user. It's a fairly simple step, ...
[1 reply] : It works for me C:\Temp>test Enter input file name. [Default: fileC... (by SamuelAdams)
please debug my small program
 
I want program to first run and print spaces in all values of array. Then it should print the ascii characters on their mentioned positions.I am getting to err...
[4 replies] Last: @skarla, I think all you did was put in a curly brace so that it would... (by LGonzales)
How to start making a game in c++
 
Hi, my name is AHMAD & i have just started to learn to make a computer game in C++ but i have no idea how to make such a game and don't know the tutorial lin...
[4 replies] Last: Thanks Catfish2, Nexius & skarla i have ,basics, known!!! thanks fo... (by Ahmad1797)
by Nhh
0xC0000005: Access violation reading location 0x00000004 in c code
 
hi guys, i get this error in part of my program. that part is : float **matrix(long nrl, long nrh, long ncl, long nch) /* allocate a float matrix with s...
[3 replies] Last: The cdcdcd.. pattern suggests you're trying to use a bit of unititlial... (by andywestken)
Reading from a file- problem with fscanf
 
Hello I am trying to read numbes from a file and store them to a dynamic array, but the code reads correctly only the first one, but not the rest. In fact, it s...
[no replies]
Boost regex asterisk issue
 
Hey all, I've been playing around with the boost filesystem and regex libraries. I'm coming across a really annoying bug. This page: http://rosettacode...
[1 reply] : catch that exception and print its .what() string so that you know w... (by Cubbi)
expected ; or : before { token error
 
here is my function void enqueue(string name, int age) { node* newnode = new node(); //error here newnode->set(name, age); new...
[1 reply] : size++ } (by dwyrt65)
by EJonah
pricing program errors
 
#include <iostream> #include <cmath> using namespace std; //introduces namespace standard library void getdata (int& length, int& width, float& costpersqf...
[1 reply] : cin >> count; //enter number of lines you wants Did you mean to sto... (by Moschops)
by jimm78
how to make a char move in a grid using 2d arrays and gotoxy().
 
I am making a game for a school project with gotoxy and getch and 2d character arrays. there is supposed to be a robot type figure that can move left and right ...
[11 replies] Last: @jimm78 how can i make the program from closing when the robot reach... (by whitenite1)
Error
 
#include <iostream> #include <stdlib.h> using namespace std; int main(int argc, char *argv ) {int a,b=1,c=1,d=1; cin>>a; while(c<a){ while(b<c){ i...
[1 reply] : Count how many of these you have: { Now count how many of these you... (by Moschops)
c++ beginner having trouble writing a basic currency converter
 
I am still learnning the basics of C++ and have been given the assignment of writing my own currency converter program. I have tried to figure as much out from ...
[3 replies] Last: The program appears to work but I keep getting the message Debugging ... (by po12636)
dequeue function in c++
 
hi, im creating queue using linked list, the node has two data member in its private section now to dequeue a node from front, i have to move front pointer ah...
[1 reply] : this didn't work b/c get will only return one data member All right... (by Catfish2)
by EZX
CODE doesnt work, int error...
 
So i did a task to improve my programming a bit but obviously my code has problems after almost finish the task and testing it out it gives me this error and i ...
[4 replies] Last: Saw the mistake, thanks #include <iostream.h> #include <conio.h> #in... (by EZX)
file i/o
 
Hey, I tried to search a string in a txt file, and write the found ones into another file. but i have a problem, it seems that my code doesnt enter the while l...
[3 replies] Last: thanks, it works :D (by Sebastian NoName)
by EZX
Massive row HELP - Determining arithmetic mean in a row
 
Hi, i have trouble finding a way to determine arithmetic mean in each row. The task asks me to get all the POSITIVE numbers in each row and determing the arit...
[7 replies] Last: oh i think i got it thanks! (by EZX)
by jaded7
Typesafety overhead
 
In order to avoid "magic numbers", I usually use a #define as necessary. However, I've been told to avoid this because of the issue of typesafety, and instead t...
[7 replies] Last: Alright, thanks for the advice, I can definitely see why #define is no... (by jaded7)
How to send a string to system()
 
i am just starting out and i wrote a simple program to ask basic questions and than assemble them into a fully formed command line operation. i cant figure out ...
[1 reply] : First check the documentation. http://en.cppreference.com/w/cpp/utilit... (by Moschops)
November 2012 Pages: 1... 2829303132... 75
  Archived months: [oct2012] [dec2012]

This is an archived page. To post a new message, go to the current page.