Beginners - January 2019 (Page 4)

How to write to a txt file
 
How to write to a txt file this program #include<stdio.h> main() { int i = 1; int a=0,b=0,c=0; for(a=1;a<=4;a++) { for(b=1;b<=5;b++) { fo...
[12 replies] Last: Thank You Very Much Thats it (by avnitoto)
Code not working
 
Dear friends Please can some one point out the error in the following, I am not able to run this in Dev. #include<iostream> using namespace std; int ...
[2 replies] Last: Thanks dear I got the reply. (by usmannazir)
How to find average of multiple rows within a text file.
 
Write your question here. Hello! I am having trouble finding out how to read a file and find an average for the 10 rows of numbers. I already have the file ope...
[2 replies] Last: ... std::vector<double> v_averages; // instantiates an empty vector... (by nuderobmonkey)
error: variable or field ‘print_array’ declared void
 
Hello fellow programmers... I'm working on a data operations project and I'm trying to figure out what part of this code I'm writing wrong... I've lookup up the...
[2 replies] Last: its ok i fiugred it out.....I learned alot about arguments that i didi... (by kingjames05)
How to check and find next aligned 32 byte address?
 
Hi everyone, I had a little question about data alignment with a given address. Assumed we have a address p and we don't know it is 32 bytes aligned or not. Ho...
[4 replies] Last: uint16_t getAddr(uint16_t addr) { uint16_t answer; const uint... (by mzimmers)
_mm256_cmpgt_epu8_mask link error
 
It is quite hard to find the problem. When I could use _mm256_cmpeq_epi8, _mm256_add_epi32 already. But when I want to use the _mm256_cmpgt_epu8_mask, compile f...
[1 reply] : https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm... (by CakeByTheOcean)
What's wrong with the cicle
 
#include <iostream> #include <cstdlib> #include <cmath> #include <clocale> using namespace std; int main() { int j,s; do{ cin >> j; if (j ==...
[7 replies] Last: There is a warning when compiling the program: warning C4566: charac... (by closed account E0p9LyTq)
How to show output NOT in scientific notation
 
I am writing a tax calculation program for class and am having trouble with two parts. One: My output is being displayed in scientific notation, and I would ...
[1 reply] : Hello al bama cpp, By putting a green check on your post you are tell... (by Handy Andy)
Need a simple program code review please
 
Hello, I recently tried to code a program that displays if any digit in a given number in a (10000 to 99999 range) is equal to another one (e.g: if the user i...
[4 replies] Last: I havent learned about array yet. When you learn about C-style strin... (by closed account E0p9LyTq)
tic tac toe
 
Can someone help me on understand where i went wrong on why the number chosen is not changing to X or O #include <iostream> using namespace std; char...
[3 replies] Last: so i added the win and instead of loop i did it manual but i cant get ... (by garza07)
_mm256_load_si256: How to achieve data alignment?
 
Hi everyone. This simple question is related with SIMD, intel avx and bit programming. I got a Address boundary error when I call _mm256_load_si256 to load 256 ...
[2 replies] Last: alignas(32) uint8_t array[1 << 8]; std::cout << "data ... (by CakeByTheOcean)
Can anyone explains this to me ?
 
Can anyone explains how this code works ? Why we put a condition in an array ? how is this ? I cant understand this !? #include<iostream> #include<string> ...
[3 replies] Last: it is often faster in high performance code to have a little static ar... (by jonnin)
by SPASH
2d vector problem
 
In order to use a 2d vector, I have to reverse the size of it first ,but when i do this vector <vector <troops*> >grid(100); neither this vector <v...
[1 reply] : I have to reverse the size of it first You have to do ... what? "It... (by lastchance)
sort 2d array colomun elements
 
Write your question here. How can i sort 2d array column elemetns in descending order int main() { int a ; int i, j, s = 0, sum = 0; cout << "Iev...
[4 replies] Last: @nuderobmonkey I didn't post those links so that OP could copy and pas... (by H00G0)
Compile time array generation as global value (1,2)
 
Can I generate my array and place it like a global array? Should I leave the array empty at first? The reason: I had a very large array, it should be a global,...
[20 replies] Last: Does execution not start until the entire program is loaded in (probab... (by Grime)
Change value for card
 
I've managed to change the players ace score 11 to 1, so when a player twists and there score will exceed 21 if there next card is an ace, the ace will change t...
[2 replies] Last: but the dealer will go bust if i do that. I need 1 ace to be 11 and th... (by Robin53)
Why the second version didn't work ?
 
I made a program that put letter between numbers which you enter ... I made two version of this code but the second code didn't work although that I just made o...
[6 replies] Last: Thank you very much ,You and Ganado ^_^ (by MohammadAlshareef)
Vector's problem
 
Hello! I have someting strange in my code. There is my program. #include "stdafx.h" #include <iostream> #include <string> #include <sstream> #include <algo...
[8 replies] Last: Thank you. I want to loop my program and use this code setlocale(LC_... (by Alex009988)
Compile time function for array generating
 
A general but simple question. How could I generate a int array like from 1 to 100 in the Compile time?
[10 replies] Last: I guess you edited your question while I was writing: Can you make co... (by mbozzi)
by jmpt
Issues with encription
 
I have this code that scrambles a given char array and gives a code to unscramble it. There are 2 issues: - the encryption bugs out with 10 chars - it only re...
[2 replies] Last: Do everyone a favour and rip out all this code. gotoXY(20,7); cout... (by salem c)
January 2019 Pages: 123456... 17
  Archived months: [dec2018] [feb2019]

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